|
|
@@ -92,12 +92,21 @@ public class sendplandetail extends Controller {
|
|
|
insertSQL.setValue("willoutqty", willoutqty);
|
|
|
insertSQL.setValue("willinqty", 0);
|
|
|
insertSQL.setValue("canuseqty", canuseqty);
|
|
|
+ if(row.getLong("itemid")==3853){
|
|
|
+ System.err.println("canuseqty1:"+canuseqty);
|
|
|
+ }
|
|
|
|
|
|
if (row.getLong("itemid") == olditemid) {
|
|
|
insertSQL.setValue("canuseqty", (oldcanuseqty.compareTo(BigDecimal.ZERO) == 0 ? canuseqty : oldcanuseqty).subtract(oldsendqty));
|
|
|
+ if(row.getLong("itemid")==3853){
|
|
|
+ System.err.println("canuseqty2:"+(oldcanuseqty.compareTo(BigDecimal.ZERO) == 0 ? canuseqty : oldcanuseqty).subtract(oldsendqty));
|
|
|
+ }
|
|
|
newcanuseqty=(oldcanuseqty.compareTo(BigDecimal.ZERO) == 0 ? canuseqty : oldcanuseqty).subtract(oldsendqty);
|
|
|
oldcanuseqty = (oldcanuseqty.compareTo(BigDecimal.ZERO) == 0 ? canuseqty : oldcanuseqty).subtract(oldsendqty);
|
|
|
} else {
|
|
|
+ if(row.getLong("itemid")==3853){
|
|
|
+ System.err.println("canuseqty3:"+canuseqty);
|
|
|
+ }
|
|
|
insertSQL.setValue("canuseqty", canuseqty);
|
|
|
newcanuseqty=canuseqty;
|
|
|
}
|