|
@@ -99,7 +99,7 @@ public class saorderdetail extends PaoCust {
|
|
|
setFieldFlag(new String[]{"fprice", "famount", "frateprice", "frateamount"}, REQUIRED, true);
|
|
setFieldFlag(new String[]{"fprice", "famount", "frateprice", "frateamount"}, REQUIRED, true);
|
|
|
}
|
|
}
|
|
|
if ("提交".equals(fstatus)) {
|
|
if ("提交".equals(fstatus)) {
|
|
|
- setFieldFlag(new String[]{"fplandate","fnotes"}, READONLY, false);
|
|
|
|
|
|
|
+ setFieldFlag(new String[]{"fplandate", "fnotes"}, READONLY, false);
|
|
|
}
|
|
}
|
|
|
if ("审核".equals(fstatus) || "关闭".equals(fstatus)) {
|
|
if ("审核".equals(fstatus) || "关闭".equals(fstatus)) {
|
|
|
double frateprice = getDouble("frateprice");//订单单价
|
|
double frateprice = getDouble("frateprice");//订单单价
|
|
@@ -306,8 +306,12 @@ public class saorderdetail extends PaoCust {
|
|
|
if ("FCHANGEQTY".equals(fieldname)) {
|
|
if ("FCHANGEQTY".equals(fieldname)) {
|
|
|
double fundeliqty = getDouble("fundeliqty");
|
|
double fundeliqty = getDouble("fundeliqty");
|
|
|
double fqty = getDouble("fqty");
|
|
double fqty = getDouble("fqty");
|
|
|
|
|
+ double foldqty = getPaoField("fqty").getPreviousValue().asDouble();
|
|
|
|
|
+ if (fqty >= foldqty) {
|
|
|
|
|
+ throw new P2AppException("", "修改数量必须小于原订单数量" + Math.sub(fqty, fundeliqty));
|
|
|
|
|
+ }
|
|
|
if (getDouble(fieldname) < Math.sub(fqty, fundeliqty)) {
|
|
if (getDouble(fieldname) < Math.sub(fqty, fundeliqty)) {
|
|
|
- throw new P2AppException("", "数量不可小于已发货数量" + Math.sub(fqty, fundeliqty));
|
|
|
|
|
|
|
+ throw new P2AppException("", "修改数量必须大于等于已发货数量" + Math.sub(fqty, fundeliqty));
|
|
|
}
|
|
}
|
|
|
if (getDouble(fieldname) < 0) {
|
|
if (getDouble(fieldname) < 0) {
|
|
|
throw new P2AppException("", "修改数量不可小于0");
|
|
throw new P2AppException("", "修改数量不可小于0");
|