Compare commits

..

2 Commits

Author SHA1 Message Date
8179ad60e1 Put back weblog logging, lost when updating
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2024-08-15 08:34:34 +10:00
e7f1ab638f Added TxnTaxDetail to InvoiceAdd 2024-08-15 08:34:34 +10:00
2 changed files with 117 additions and 110 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'=>$key->taxes->first()->tax->provider_ref($to->provider)],
'TaxCodeRef' => ['value'=>$tcf=$key->taxes->first()->tax->provider_ref($to->provider)],
];
$line->Amount = round($os->sum('quantity')*$key->price_base,2);
@ -118,7 +118,8 @@ class InvoiceAdd extends Command
'Amount' => $x,
'DetailType' => 'TaxLineDetail',
'TaxLineDetail' => (object)[
'TaxRateRef' => (object)['value'=>23],
// @todo It is assumed there is only 1 tax category
'TaxRateRef' => (object)['value'=>$to->API()->getTaxCodeQuery($tcf)->getTaxRateRef()->first()],
'NetAmountTaxable' => $io->subtotal,
]
]
@ -126,8 +127,6 @@ 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', 'single')),
'channels' => explode(',', env('LOG_STACK', 'daily')),
'ignore_exceptions' => false,
],
@ -73,6 +73,14 @@ 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'),