支付方式修改

This commit is contained in:
2025-03-11 14:42:14 +08:00
parent 194386ceda
commit 79852501a6

View File

@@ -192,12 +192,19 @@ class LedgerForm extends BaseModel
$totalBuyPrice = round($number * $v['buy_price'], 4);
if ($productOrder['prescription']['category'] == 2) {
(new MonthlyPaymentModel)->save([
'store_id' => $productOrder->store_id,
'order_id' => $productOrder->id,
'amount' => $totalBuyPrice,
'created_at' => $time,
]);
$model = new MonthlyPaymentModel();
$model->store_id = $productOrder->store_id;
$model->order_id = $productOrder->id;
$model->amount = $totalBuyPrice;
$model->created_at = $time;
$model->save();
// (new MonthlyPaymentModel)->save([
// 'store_id' => $productOrder->store_id,
// 'order_id' => $productOrder->id,
// 'amount' => $totalBuyPrice,
// 'created_at' => $time,
// ]);
} else {
$ledger[] = [
@@ -246,12 +253,18 @@ class LedgerForm extends BaseModel
$totalPrice = round($v['number'] * $v['price'], 4);
$totalBuyPrice = round($v['number'] * $v['buy_price'], 4);
if ($productOrder['prescription']['category'] == 2) {
(new MonthlyPaymentModel)->save([
'store_id' => $productOrder->store_id,
'order_id' => $productOrder->id,
'amount' => $totalBuyPrice,
'created_at' => $time,
]);
// (new MonthlyPaymentModel)->save([
// 'store_id' => $productOrder->store_id,
// 'order_id' => $productOrder->id,
// 'amount' => $totalBuyPrice,
// 'created_at' => $time,
// ]);
$model = new MonthlyPaymentModel();
$model->store_id = $productOrder->store_id;
$model->order_id = $productOrder->id;
$model->amount = $totalBuyPrice;
$model->created_at = $time;
$model->save();
} else {
$ledger[] = [
'order_id' => $this->order_id,