|
@@ -10,7 +10,7 @@ use think\App;
|
|
|
use think\facade\Validate;
|
|
|
class InvoiceItem extends Base{
|
|
|
public function __construct(App $app) {
|
|
|
- $this->novalidate = ["*"];
|
|
|
+ # $this->novalidate = ["*"];
|
|
|
parent::__construct($app);
|
|
|
}
|
|
|
//查询
|
|
@@ -109,6 +109,8 @@ class InvoiceItem extends Base{
|
|
|
"diff_info"=>$diff,
|
|
|
"status"=>$balance>0?2:1,
|
|
|
"remark"=>$v["remark"],
|
|
|
+ "apply_id"=>$this->uid,
|
|
|
+ "apply_name"=>$this->uname
|
|
|
];
|
|
|
}
|
|
|
$item->startTrans();
|
|
@@ -117,7 +119,7 @@ class InvoiceItem extends Base{
|
|
|
$res=(new \app\admin\model\InvoiceOrder)->saveAll($save);
|
|
|
if($res){
|
|
|
$item->balance_amount = $amount;
|
|
|
- $item->status = $amount=="0"?2:1; //已关联数据 $amont=0 2 还有余额则为1
|
|
|
+ $item->status = $amount>0?2:1; //已关联数据 $amont=0 2 还有余额则为1
|
|
|
$item->save();
|
|
|
}else throw new \Exception("添加失败");
|
|
|
$item->commit();
|