更新开票及状态处理
This commit is contained in:
parent
329be8258a
commit
650f764617
|
@ -465,7 +465,7 @@ class FinanceInvoice extends ApiController
|
|||
if (empty($param['open_time'])) {
|
||||
$this->apiError("开票日期不能为空");
|
||||
}
|
||||
$status = Invoice::where(['id' => $param['id']])->value('check_status');
|
||||
$status = InvoiceList::where(['id' => $param['id']])->value('check_status');
|
||||
if ($status == 2) {
|
||||
$param['check_status'] = 5;
|
||||
$param['open_admin_id'] = $this->uid;
|
||||
|
@ -473,7 +473,7 @@ class FinanceInvoice extends ApiController
|
|||
if(isset($param['open_time'])){
|
||||
$param['open_time'] = strtotime(urldecode($param['open_time']));
|
||||
}
|
||||
$res = Invoice::where('id', $param['id'])->strict(false)->field('code,check_status,open_time,open_admin_id,delivery,other_file_ids')->update($param);
|
||||
$res = InvoiceList::where('id', $param['id'])->strict(false)->field('code,check_status,open_time,open_admin_id,delivery,other_file_ids')->update($param);
|
||||
if ($res !== false) {
|
||||
add_log('open', $param['id'],$param,'发票');
|
||||
$this->apiSuccess('操作成功');
|
||||
|
@ -506,7 +506,7 @@ class FinanceInvoice extends ApiController
|
|||
$param['update_time'] = time();
|
||||
}
|
||||
}
|
||||
$res = Invoice::where('id', $param['id'])->strict(false)->field('check_status')->update($param);
|
||||
$res = InvoiceList::where('id', $param['id'])->strict(false)->field('check_status')->update($param);
|
||||
if ($res !== false) {
|
||||
add_log('tovoid', $param['id'],$param,'发票');
|
||||
$this->apiSuccess('操作成功');
|
||||
|
@ -533,7 +533,7 @@ class FinanceInvoice extends ApiController
|
|||
$param['check_status'] = 5;
|
||||
$param['update_time'] = time();
|
||||
add_log('tovoid', $param['id'],$param,'发票');
|
||||
$res = Invoice::where('id', $param['id'])->strict(false)->field('check_status')->update($param);
|
||||
$res = InvoiceList::where('id', $param['id'])->strict(false)->field('check_status')->update($param);
|
||||
if ($res !== false) {
|
||||
add_log('novoid', $param['id'],$param,'发票');
|
||||
$this->apiSuccess('操作成功');
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace app\finance\controller;
|
|||
|
||||
use app\base\BaseController;
|
||||
use app\finance\model\Invoice as InvoiceList;
|
||||
use app\finance\model\InvoiceIncome;
|
||||
use app\finance\validate\InvoiceCheck;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Db;
|
||||
|
|
Loading…
Reference in New Issue