Fix a problem at CRM where downloading of invoice in PDF throws errors

This commit is contained in:
Dillon
2023-03-19 22:20:49 +08:00
parent 0d4f7e0ed5
commit f73b1d7fe3
@@ -35,6 +35,9 @@ class UpdatesPerfexCRMInvoice
array_push($newInvoiceItems,$item);
}
$allowedPaymentModes = [];
array_push($allowedPaymentModes, 1, 2);
$data = [
'number' => $invoice->number,
'date' => $invoice->date,
@@ -46,7 +49,7 @@ class UpdatesPerfexCRMInvoice
'shipping_street' => $invoice->billing_street,
'project_id' => $projectId,
'items' => $newInvoiceItems,
'allowed_payment_modes' => $invoice->allowed_payment_modes,
'allowed_payment_modes' => $allowedPaymentModes,
];
$response = Http::asJson()->withHeaders([