|
@@ -91,7 +91,7 @@ public class stockbill extends Controller {
|
|
|
|
|
|
siteid = "lsa";
|
|
|
|
|
|
- Long sa_cashbillid = 0L;
|
|
|
+// Long sa_cashbillid = 0L;
|
|
|
|
|
|
Rows stockbillRows = dbConnect.runSqlQuery("select * from st_stockbill where siteid='lsa' and status='审核' and billno='" + fbillnum + "'");
|
|
|
Long st_stockbillid = 0L;
|
|
@@ -217,19 +217,19 @@ public class stockbill extends Controller {
|
|
|
String icstockbillrebateaccount = Parameter.get(siteid, "icstockbillrebateaccount"); //经销商销售出库单返利账户
|
|
|
String icstockbillrebaterate1 = Parameter.get(siteid, "icstockbillrebaterate"); //销售出库单返利比例
|
|
|
if (!StringUtils.isBlank(icstockbillrebateaccount) && !StringUtils.isBlank(icstockbillrebaterate1)) {
|
|
|
- BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
- //经销商返利
|
|
|
- BigDecimal rebateamount = icstockbillrebaterate.multiply(amountTotal);
|
|
|
- System.out.println(rebateamount);
|
|
|
- CashbillEntity entity = new CashbillEntity();
|
|
|
- entity.setAmount(rebateamount);
|
|
|
- entity.setOwnerid(st_stockbillid);
|
|
|
- entity.setOwnertable("st_stockbill");
|
|
|
- entity.setSource("");
|
|
|
- entity.setRemarks("销售出库单" + fbillnum + "返利");
|
|
|
- JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
- sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
- sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
+// BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
+// //经销商返利
|
|
|
+// BigDecimal rebateamount = icstockbillrebaterate.multiply(amountTotal);
|
|
|
+// System.out.println(rebateamount);
|
|
|
+// CashbillEntity entity = new CashbillEntity();
|
|
|
+// entity.setAmount(rebateamount);
|
|
|
+// entity.setOwnerid(st_stockbillid);
|
|
|
+// entity.setOwnertable("st_stockbill");
|
|
|
+// entity.setSource("");
|
|
|
+// entity.setRemarks("销售出库单" + fbillnum + "返利");
|
|
|
+// JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
+// sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
+// sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -250,22 +250,22 @@ public class stockbill extends Controller {
|
|
|
billamount = billamount.add(row.getBigDecimal("amount").abs().negate());
|
|
|
}
|
|
|
|
|
|
- //返利比例
|
|
|
- String icstockbillrebateaccount = Parameter.get(siteid, "icstockbillrebateaccount"); //经销商销售出库单返利账户
|
|
|
- String icstockbillrebaterate1 = Parameter.get(siteid, "icstockbillrebaterate"); //销售出库单返利比例
|
|
|
- BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
- //经销商返利
|
|
|
- BigDecimal rebateamount = icstockbillrebaterate.multiply(billamount);
|
|
|
-
|
|
|
- CashbillEntity entity = new CashbillEntity();
|
|
|
- entity.setAmount(rebateamount);
|
|
|
- entity.setOwnerid(stockbillRows.get(0).getLong("st_stockbillid"));
|
|
|
- entity.setOwnertable("st_stockbill");
|
|
|
- entity.setSource("");
|
|
|
- entity.setRemarks("销售出库单" + fbillnum + "反返利");
|
|
|
- JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
- sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
- sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
+// //返利比例
|
|
|
+// String icstockbillrebateaccount = Parameter.get(siteid, "icstockbillrebateaccount"); //经销商销售出库单返利账户
|
|
|
+// String icstockbillrebaterate1 = Parameter.get(siteid, "icstockbillrebaterate"); //销售出库单返利比例
|
|
|
+// BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
+// //经销商返利
|
|
|
+// BigDecimal rebateamount = icstockbillrebaterate.multiply(billamount);
|
|
|
+//
|
|
|
+// CashbillEntity entity = new CashbillEntity();
|
|
|
+// entity.setAmount(rebateamount);
|
|
|
+// entity.setOwnerid(stockbillRows.get(0).getLong("st_stockbillid"));
|
|
|
+// entity.setOwnertable("st_stockbill");
|
|
|
+// entity.setSource("");
|
|
|
+// entity.setRemarks("销售出库单" + fbillnum + "反返利");
|
|
|
+// JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
+// sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
+// sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
/**
|
|
|
* 更新发货单数量
|
|
|
*/
|
|
@@ -294,21 +294,21 @@ public class stockbill extends Controller {
|
|
|
}
|
|
|
|
|
|
//返利比例
|
|
|
- String icstockbillrebateaccount = Parameter.get(siteid, "icstockbillrebateaccount"); //经销商销售出库单返利账户
|
|
|
- String icstockbillrebaterate1 = Parameter.get(siteid, "icstockbillrebaterate"); //销售出库单返利比例
|
|
|
- BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
- //经销商返利
|
|
|
- BigDecimal rebateamount = icstockbillrebaterate.multiply(billamount);
|
|
|
-
|
|
|
- CashbillEntity entity = new CashbillEntity();
|
|
|
- entity.setAmount(rebateamount);
|
|
|
- entity.setOwnerid(stockbillRows.get(0).getLong("st_stockbillid"));
|
|
|
- entity.setOwnertable("st_stockbill");
|
|
|
- entity.setSource("");
|
|
|
- entity.setRemarks("销售出库单" + fbillnum + "反返利");
|
|
|
- JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
- sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
- sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
+// String icstockbillrebateaccount = Parameter.get(siteid, "icstockbillrebateaccount"); //经销商销售出库单返利账户
|
|
|
+// String icstockbillrebaterate1 = Parameter.get(siteid, "icstockbillrebaterate"); //销售出库单返利比例
|
|
|
+// BigDecimal icstockbillrebaterate = new BigDecimal(icstockbillrebaterate1);
|
|
|
+// //经销商返利
|
|
|
+// BigDecimal rebateamount = icstockbillrebaterate.multiply(billamount);
|
|
|
+//
|
|
|
+// CashbillEntity entity = new CashbillEntity();
|
|
|
+// entity.setAmount(rebateamount);
|
|
|
+// entity.setOwnerid(stockbillRows.get(0).getLong("st_stockbillid"));
|
|
|
+// entity.setOwnertable("st_stockbill");
|
|
|
+// entity.setSource("");
|
|
|
+// entity.setRemarks("销售出库单" + fbillnum + "反返利");
|
|
|
+// JSONObject cashbillIncome = Accountbalance.createCashbillIncome(this, sys_enterpriseid, Long.valueOf(icstockbillrebateaccount).longValue(), entity, true, false);
|
|
|
+// sqlList.addAll(cashbillIncome.getJSONArray("sqlList").toJavaList(String.class));
|
|
|
+// sa_cashbillid = cashbillIncome.getLong("sa_cashbillid");
|
|
|
/**
|
|
|
* 更新发货单数量
|
|
|
*/
|
|
@@ -328,7 +328,7 @@ public class stockbill extends Controller {
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
|
|
|
|
|
|
- Accountbalance.remindSend(this, sys_enterpriseid, sa_cashbillid);
|
|
|
+// Accountbalance.remindSend(this, sys_enterpriseid, sa_cashbillid);
|
|
|
if (stockbillRows.isEmpty() && "0".equals(isdelete) && "审核".equals(fstatus)) {
|
|
|
ArrayList<Long> userIdList = dbConnect.runSqlQuery("select userid from sys_enterprise_hr where siteid='" + siteid + "' and sys_enterpriseid=" + sys_enterpriseid).toArrayList("userid", new ArrayList<>());
|
|
|
Executor.sendEml(this, "stocck_check", st_stockbillid, siteid, userIdList);
|