|
@@ -246,7 +246,7 @@ public class saorder extends BaseSaorder {
|
|
|
double fdetailamount = detailpao.getDouble("famount");
|
|
double fdetailamount = detailpao.getDouble("famount");
|
|
|
double fmjamount = detailpao.getDouble("fmjamount");
|
|
double fmjamount = detailpao.getDouble("fmjamount");
|
|
|
double fdetailflamount = Math.mul(Math.div(Math.sub(fdetailamount, fmjamount), ftotalamount), fuseflamount, 2);
|
|
double fdetailflamount = Math.mul(Math.div(Math.sub(fdetailamount, fmjamount), ftotalamount), fuseflamount, 2);
|
|
|
- detailpao.setValue("fflamount", fdetailflamount,2L);
|
|
|
|
|
|
|
+ detailpao.setValue("fflamount", fdetailflamount, 2L);
|
|
|
frowflamount = Math.add(frowflamount, fdetailflamount);
|
|
frowflamount = Math.add(frowflamount, fdetailflamount);
|
|
|
|
|
|
|
|
lastdetailpao = detailpao;
|
|
lastdetailpao = detailpao;
|
|
@@ -260,7 +260,7 @@ public class saorder extends BaseSaorder {
|
|
|
double yu = Math.sub(frowflamount, fuseflamount);
|
|
double yu = Math.sub(frowflamount, fuseflamount);
|
|
|
|
|
|
|
|
if (yu != 0) {
|
|
if (yu != 0) {
|
|
|
- lastdetailpao.setValue("fflamount", Math.sub(lastdetailpao.getDouble("fflamount"), yu),2L);
|
|
|
|
|
|
|
+ lastdetailpao.setValue("fflamount", Math.sub(lastdetailpao.getDouble("fflamount"), yu), 2L);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -2028,7 +2028,9 @@ public class saorder extends BaseSaorder {
|
|
|
}
|
|
}
|
|
|
DBConnect dbConnect = new DBConnect("ORACLE_TZ");
|
|
DBConnect dbConnect = new DBConnect("ORACLE_TZ");
|
|
|
Rows rows = dbConnect.runSqlQuery("select SO_LINE2,sum(QTY)as QTY from v_eso_shipped_qty where SO_NO2='" + getString("fsonum") + "' and ZT='" + (getString("siteid").equalsIgnoreCase("TZ") ? "IDCZJ10" : "IBPNB10") + "' group by SO_LINE2");
|
|
Rows rows = dbConnect.runSqlQuery("select SO_LINE2,sum(QTY)as QTY from v_eso_shipped_qty where SO_NO2='" + getString("fsonum") + "' and ZT='" + (getString("siteid").equalsIgnoreCase("TZ") ? "IDCZJ10" : "IBPNB10") + "' group by SO_LINE2");
|
|
|
-
|
|
|
|
|
|
|
+ if (!"".equals(rows.errmsg)) {
|
|
|
|
|
+ throw new P2AppException("", "erp连接失败");
|
|
|
|
|
+ }
|
|
|
PaoSetRemote saorderdetail = getPaoSet("saorderdetail");
|
|
PaoSetRemote saorderdetail = getPaoSet("saorderdetail");
|
|
|
saorderdetail.setOrderBy("frownum");
|
|
saorderdetail.setOrderBy("frownum");
|
|
|
saorderdetail.reset();
|
|
saorderdetail.reset();
|
|
@@ -2073,10 +2075,10 @@ public class saorder extends BaseSaorder {
|
|
|
PaoSetRemote saorderdetail = getPaoSet("saorderdetail");
|
|
PaoSetRemote saorderdetail = getPaoSet("saorderdetail");
|
|
|
int i = 0;
|
|
int i = 0;
|
|
|
while (saorderdetail.getPao(i) != null) {
|
|
while (saorderdetail.getPao(i) != null) {
|
|
|
- double fundeliqty = saorderdetail.getPao(i).getInt("fundeliqty");//订单未发货数量
|
|
|
|
|
|
|
+ //double fundeliqty = saorderdetail.getPao(i).getInt("fundeliqty");//订单未发货数量
|
|
|
double fqty = saorderdetail.getPao(i).getInt("fqty");//订单数量
|
|
double fqty = saorderdetail.getPao(i).getInt("fqty");//订单数量
|
|
|
double FERPDELIQTY = saorderdetail.getPao(i).getDouble("FERPDELIQTY");//erp已发货数量
|
|
double FERPDELIQTY = saorderdetail.getPao(i).getDouble("FERPDELIQTY");//erp已发货数量
|
|
|
- if (fqty > fundeliqty) {
|
|
|
|
|
|
|
+ if (fqty > FERPDELIQTY) {
|
|
|
saorderdetail.getPao(i).setValue("fchangenotes", "订单结案变更", 11L);
|
|
saorderdetail.getPao(i).setValue("fchangenotes", "订单结案变更", 11L);
|
|
|
saorderdetail.getPao(i).setValue("fchangeqty", FERPDELIQTY, 11L);
|
|
saorderdetail.getPao(i).setValue("fchangeqty", FERPDELIQTY, 11L);
|
|
|
}
|
|
}
|