Browse Source

ERP批量更新价格上传到平台,发票明细更新

hejq 8 years ago
parent
commit
aa83dd3aba

+ 1 - 1
src/main/java/com/uas/platform/b2b/service/impl/PurchaseApBillServiceImpl.java

@@ -173,7 +173,7 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService {
 			for(ProdInOutRefreshPrice prod : prodInOuts) {
 				// 更新明细单价、税率
 				String sql = " merge into purc$apbillitem i using purc$apbill a on (i.papi_papid = a.pab_id and i.papi_pdinoutno = '" + prod.getPbu_inoutno() + "' and a.pad_enuu = " + SystemSession.getUser().getEnterprise().getUu() + ")" +
-						" when matched then update set i.papi_price = " + prod.getPbu_orderprice();
+						" when matched then update set i.papi_price = " + prod.getPbu_orderprice() + ", i.papi_apamount = i.papi_thisvoqty * " + prod.getPbu_orderprice();
 				if(null != prod.getPbu_taxrate())
                     sql = sql + ",i.papi_taxrate = " + prod.getPbu_taxrate();
 				commonDao.getJdbcTemplate().update(sql);