PRSMYOBPosterUtils.cs 447 B

1234567891011121314151617
  1. using Comal.Classes;
  2. using InABox.Core;
  3. using InABox.Poster.MYOB;
  4. namespace PRS.Shared.Posters.MYOB;
  5. public static class PRSMYOBPosterUtils
  6. {
  7. public static Result<Guid, Exception> GetMYOBTaxCodeUID(this MYOBConnectionData data, ITaxCode code)
  8. {
  9. if(Guid.TryParse(code.PostedReference, out var id))
  10. {
  11. return Result.Ok(id);
  12. }
  13. return MYOBPosterUtils.GetMYOBTaxCodeUID(data, code.Code);
  14. }
  15. }