提交 0c2b011d authored 作者: chengye's avatar chengye

test

上级 bf3adbd4
...@@ -168,6 +168,8 @@ class Invoice extends Base ...@@ -168,6 +168,8 @@ class Invoice extends Base
//获取账户ID //获取账户ID
$inv->account_id = (new Account())->getAccountId($uData['em_id']); $inv->account_id = (new Account())->getAccountId($uData['em_id']);
$inv->em_id = $uData['em_id'];
$inv->uid = $this->uid;
//保存 并且更新抄表单与账单关联表 //保存 并且更新抄表单与账单关联表
if($inv->save()){ if($inv->save()){
......
...@@ -165,8 +165,7 @@ class Useage extends Base ...@@ -165,8 +165,7 @@ class Useage extends Base
if(empty($useage_id)) { if(empty($useage_id)) {
$uModel = new \app\em\model\Useage(); $uModel = new \app\em\model\Useage();
$uModel->useage_id = $this->getUId(); $uModel->useage_id = $this->getUId();
$user = Session::get('user'); $uModel->uid = $this->uid;
$uModel->uid = $user['user_id'];
$uModel->last_sum_numb = $data['last_numb']; $uModel->last_sum_numb = $data['last_numb'];
$uModel->last_date = $data['last_date']; $uModel->last_date = $data['last_date'];
$uModel->em_id = $data['em_id']; $uModel->em_id = $data['em_id'];
...@@ -174,8 +173,7 @@ class Useage extends Base ...@@ -174,8 +173,7 @@ class Useage extends Base
//峰谷类型 //峰谷类型
$uModel->type = $data['pricing_type']; $uModel->type = $data['pricing_type'];
} } else {
else {
$this->checkEnd($useage_id); $this->checkEnd($useage_id);
$action = '修改'; $action = '修改';
$uModel = (new \app\em\model\Useage())->get(['useage_id' => $useage_id]); $uModel = (new \app\em\model\Useage())->get(['useage_id' => $useage_id]);
......
...@@ -71,7 +71,7 @@ class WriteOff extends Controller ...@@ -71,7 +71,7 @@ class WriteOff extends Controller
*/ */
public function writeOffFromInvoice($invoice_id){ public function writeOffFromInvoice($invoice_id){
//获取账单对象 //获取账单对象
$invoice = EmInvoice::field('id,invoice_id,payment_amount,payment_balance') $invoice = EmInvoice::field('id,invoice_id,account_id,payment_amount,payment_balance')
->where('invoice_id','=',$invoice_id)->find(); ->where('invoice_id','=',$invoice_id)->find();
//查询关系表中与当前invoice_id相关联的payment_id //查询关系表中与当前invoice_id相关联的payment_id
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论