|
@@ -4,13 +4,13 @@
|
|
namespace app\admin\controller;
|
|
namespace app\admin\controller;
|
|
|
|
|
|
use app\admin\model\InvoiceGood;
|
|
use app\admin\model\InvoiceGood;
|
|
-use app\admin\model\OrderCategory;
|
|
|
|
|
|
+use app\admin\model\InvoiceOrder;use app\admin\model\OrderCategory;
|
|
use app\admin\model\PayInfo;
|
|
use app\admin\model\PayInfo;
|
|
use think\App;
|
|
use think\App;
|
|
use think\facade\Validate;
|
|
use think\facade\Validate;
|
|
class InvoiceItem extends Base{
|
|
class InvoiceItem extends Base{
|
|
public function __construct(App $app) {
|
|
public function __construct(App $app) {
|
|
- # $this->novalidate = ["*"];
|
|
|
|
|
|
+ $this->novalidate = ["*"];
|
|
parent::__construct($app);
|
|
parent::__construct($app);
|
|
}
|
|
}
|
|
//查询
|
|
//查询
|
|
@@ -27,6 +27,10 @@ class InvoiceItem extends Base{
|
|
->field("b.sequenceNo,b.goodNo,b.goodName,(b.goodNum-thNum) as goodNum,b.goodPrice,b.totalPrice,
|
|
->field("b.sequenceNo,b.goodNo,b.goodName,(b.goodNum-thNum) as goodNum,b.goodPrice,b.totalPrice,
|
|
c.merge_code,c.cat_code,c.cat_name,c.short_name,c.tax,c.inv_good_name")
|
|
c.merge_code,c.cat_code,c.cat_name,c.short_name,c.tax,c.inv_good_name")
|
|
->select();
|
|
->select();
|
|
|
|
+ $list->each(function (&$item){
|
|
|
|
+
|
|
|
|
+ $item['balance_amount']= bcsub($item['totalPrice'],InvoiceOrder::getInvoiceOrderTotalFee($item['sequenceNo']),2);
|
|
|
|
+ });
|
|
$this->success('获取成功',$list);
|
|
$this->success('获取成功',$list);
|
|
}
|
|
}
|
|
//查询
|
|
//查询
|
|
@@ -43,6 +47,9 @@ class InvoiceItem extends Base{
|
|
->field("b.sequenceNo,b.goodNo,b.goodName,a.goodNum,a.goodPrice,a.totalPrice,
|
|
->field("b.sequenceNo,b.goodNo,b.goodName,a.goodNum,a.goodPrice,a.totalPrice,
|
|
c.merge_code,c.cat_code,c.cat_name,c.short_name,c.tax,c.inv_good_name")
|
|
c.merge_code,c.cat_code,c.cat_name,c.short_name,c.tax,c.inv_good_name")
|
|
->select();
|
|
->select();
|
|
|
|
+ $list->each(function (&$item){
|
|
|
|
+ $item['balance_amount']= bcsub($item['totalPrice'],InvoiceOrder::getInvoiceOrderTotalFee($item['sequenceNo']),2);
|
|
|
|
+ });
|
|
$this->success('获取成功',$list);
|
|
$this->success('获取成功',$list);
|
|
}
|
|
}
|
|
//添加发票明细对应关系
|
|
//添加发票明细对应关系
|