|
@@ -120,6 +120,7 @@ public class CustomerMYOBPoster : IMYOBPoster<Customer, CustomerMYOBPosterSettin
|
|
|
// Notes =
|
|
|
// PhotoURI =
|
|
|
// RowVersion =
|
|
|
+ myobCustomer.SellingDetails ??= new();
|
|
|
myobCustomer.SellingDetails.SaleLayout = InvoiceLayoutType.NoDefault;
|
|
|
// myobCustomer.SellingDetails.PrintedFOrm =
|
|
|
myobCustomer.SellingDetails.InvoiceDelivery = DocumentAction.PrintAndEmail;
|
|
@@ -144,7 +145,9 @@ public class CustomerMYOBPoster : IMYOBPoster<Customer, CustomerMYOBPosterSettin
|
|
|
{
|
|
|
return Result.Error(new Exception($"Failed to find TaxCode in MYOB with code {settings.DefaultTaxCode}"));
|
|
|
}
|
|
|
+ myobCustomer.SellingDetails.TaxCode ??= new();
|
|
|
myobCustomer.SellingDetails.TaxCode.UID = taxID;
|
|
|
+ myobCustomer.SellingDetails.FreightTaxCode ??= new();
|
|
|
myobCustomer.SellingDetails.FreightTaxCode.UID = taxID;
|
|
|
}
|
|
|
else
|
|
@@ -249,7 +252,7 @@ public class CustomerMYOBPoster : IMYOBPoster<Customer, CustomerMYOBPosterSettin
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- var result = service.UpdateEx(ConnectionData.CompanyFile, myobCustomer, ConnectionData.CompanyFileCredentials);
|
|
|
+ var result = service.Save(ConnectionData, myobCustomer);
|
|
|
customer.PostedReference = result.UID.ToString();
|
|
|
results.AddSuccess(customer);
|
|
|
}
|