update
This commit is contained in:
parent
aaf7a2e40f
commit
fe6a4719da
@ -93,12 +93,12 @@
|
|||||||
}
|
}
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
$enter_amount = bcadd($income_amount,$invoice['enter_amount'],2);
|
Db::name('oa_invoice_income')->where('inid',$params['invoice_id'])->delete();
|
||||||
Db::name('oa_invoice_income')->insertAll($save_data);
|
Db::name('oa_invoice_income')->insertAll($save_data);
|
||||||
Db::name('oa_invoice')->where('id',$params['invoice_id'])->update([
|
Db::name('oa_invoice')->where('id',$params['invoice_id'])->update([
|
||||||
'enter_amount' => $enter_amount,
|
'enter_amount' => $income_amount,
|
||||||
'enter_time' => time(),
|
'enter_time' => time(),
|
||||||
'is_cash' => $enter_amount < $invoice['amount'] ? 1 : 2
|
'is_cash' => $income_amount < $invoice['amount'] ? 1 : 2
|
||||||
]);
|
]);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return $this->success('ok');
|
return $this->success('ok');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user