mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
update call wac webhook
This commit is contained in:
@@ -75,6 +75,8 @@ class CreateInvoiceTransactionProcessor
|
||||
*/
|
||||
public function execute(PackingList $packingList)
|
||||
{
|
||||
$ori_packing_list = $packingList;
|
||||
|
||||
$packing_list = PackingList::where('reference', $packingList->reference)->where('type', PackingListType::SHIPPING_PACKING_LIST)->first();
|
||||
|
||||
$billable_packing_list = $packing_list->packingLists()->first();
|
||||
@@ -244,13 +246,13 @@ class CreateInvoiceTransactionProcessor
|
||||
$hasInvoiceCreated = Transaction::withTrashed()
|
||||
->where('type', TransactionType::SHIPPING_INVOICE)
|
||||
->where('owner_type', PackingList::class)
|
||||
->where('owner_id', $packingList->id)
|
||||
->where('owner_id', $ori_packing_list->id)
|
||||
->exists();
|
||||
|
||||
Log::channel('wac_webhook')->info('Regenerating Invoice for PackingList: ' . $packingList->id . '. No call wac api.');
|
||||
Log::channel('wac_webhook')->info('Regenerating Invoice for PackingList: ' . $ori_packing_list->id . '. No call wac api.');
|
||||
|
||||
if (app()->environment('production') && !$hasInvoiceCreated) {
|
||||
$order = $packingList->owner;
|
||||
$order = $ori_packing_list->owner;
|
||||
$companyModule = $order->companyModule;
|
||||
$company = $companyModule->company;
|
||||
$companyContact = $company->contacts()->first();
|
||||
|
||||
Reference in New Issue
Block a user