Skip to content

Commit a2e0fed

Browse files
committed
Update AST
1 parent 9d598d5 commit a2e0fed

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

CRUD_Examples/ASTExample/InvoiceUpdateWithAST.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,10 @@
2323
$isASTEnabled = $dataService->getCompanyPreferences()->TaxPrefs->PartnerTaxEnabled;
2424
if(!$isASTEnabled) throw new Exception("AST is not enabled");
2525
//Also, make sure the Sales Deposit is turned on in the settings page, and the AST is enabled.
26-
//we are going to override the tax. Again, the TxnTaxDetail.TxnTaxCodeRef is just a placeholder. It is required. You can use the same value as it is, or some random value.
26+
//we are going to override the tax. Again, the TxnTaxDetail.TxnTaxCodeRef is just a placeholder. It is required. You can use the same value as it is, or some random value, or remove it.
2727
//The only value that matters is the TotalTax here
2828
$theResourceObj = Invoice::update($invoice, [
2929
"TxnTaxDetail" => [
30-
"TxnTaxCodeRef" => [
31-
//Original value is 3, but 999999 will work
32-
"value" => "3"
33-
],
3430
//It is the totalTax that matters
3531
"TotalTax" => 210
3632
]

0 commit comments

Comments
 (0)