支付方式修改
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user