fix 1688 purchase order

This commit is contained in:
omair saleh
2022-10-19 16:28:43 +08:00
parent 0b26846122
commit 08ab6dd9c3
@@ -65,7 +65,13 @@ class CreatePurchaseOrderFor1688OrderProcessor
}
}
if(empty($products)) return false;
if(empty($products))
$object = new TransactionObject($billNumber, TransactionType::PURCHASE_ORDER, $booking->company->id, 1,
1, PaymentMethodType::CASH,
0, 0, $booking->fix_currency_id, $booking->fix_currency_id,
1, 0, 0, null, ApprovalStatus::PENDING_SUBMISSION, []);
$this->createPurchaseOrderTransactionProcessor->execute($booking, $object);
return false;
$total = collect($products)->sum(function($product){
return $product['quantity'] * floatval(str_replace(',', '', $product['unit_price']));