Compare commits

..

1 Commits

Author SHA1 Message Date
37ac0b14cf Added TxnTaxDetail to InvoiceAdd
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 31s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
2024-08-14 23:37:20 +10:00
2 changed files with 110 additions and 117 deletions

View File

@ -98,7 +98,7 @@ class InvoiceAdd extends Command
'UnitPrice' => $key->price_base,
'ItemRef' => ['value'=>$ref],
// @todo It is assumed there is only 1 tax category
'TaxCodeRef' => ['value'=>$tcf=$key->taxes->first()->tax->provider_ref($to->provider)],
'TaxCodeRef' => ['value'=>$key->taxes->first()->tax->provider_ref($to->provider)],
];
$line->Amount = round($os->sum('quantity')*$key->price_base,2);
@ -118,8 +118,7 @@ class InvoiceAdd extends Command
'Amount' => $x,
'DetailType' => 'TaxLineDetail',
'TaxLineDetail' => (object)[
// @todo It is assumed there is only 1 tax category
'TaxRateRef' => (object)['value'=>$to->API()->getTaxCodeQuery($tcf)->getTaxRateRef()->first()],
'TaxRateRef' => (object)['value'=>23],
'NetAmountTaxable' => $io->subtotal,
]
]
@ -127,6 +126,8 @@ class InvoiceAdd extends Command
];
}
dump($acc);
return AccountingInvoiceUpdate::dispatchSync($to,$acc);
}
}

View File

@ -54,7 +54,7 @@ return [
'stack' => [
'driver' => 'stack',
'channels' => explode(',', env('LOG_STACK', 'daily')),
'channels' => explode(',', env('LOG_STACK', 'single')),
'ignore_exceptions' => false,
],
@ -73,14 +73,6 @@ return [
'replace_placeholders' => true,
],
'webhook' => [
'driver' => 'daily',
'path' => storage_path('logs/webhook.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => env('LOG_DAILY_DAYS', 14),
'replace_placeholders' => true,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),