|
|
@@ -241,15 +241,17 @@ public class workorder extends Controller {
|
|
|
rows.get(0).put("cardbegdate", serviceorderitemsrows.get(0).getString("cardbegdate"));
|
|
|
rows.get(0).put("cardenddate", serviceorderitemsrows.get(0).getString("cardenddate"));
|
|
|
}
|
|
|
- Rows amountrows = dbConnect.runSqlQuery("select sa_workorderid,max(ifnull(accessoryamount,0)) accessoryamount,max(ifnull(dooramount,0)) dooramount,max(ifnull(amount,0)) amount from sa_workorder_node where sa_workorderid=" + sa_workorderid + " group by sa_workorderid");
|
|
|
+ Rows amountrows = dbConnect.runSqlQuery("select sa_workorderid,max(ifnull(accessoryamount,0)) accessoryamount,max(ifnull(dooramount,0)) dooramount,max(ifnull(otheramount,0)) otheramount,max(ifnull(amount,0)) amount from sa_workorder_node where sa_workorderid=" + sa_workorderid + " group by sa_workorderid");
|
|
|
if (amountrows.isEmpty()) {
|
|
|
rows.get(0).put("accessoryamount", 0);
|
|
|
rows.get(0).put("dooramount", 0);
|
|
|
rows.get(0).put("amount", 0);
|
|
|
+ rows.get(0).put("otheramount", 0);
|
|
|
} else {
|
|
|
rows.get(0).put("accessoryamount", amountrows.get(0).getString("accessoryamount"));
|
|
|
rows.get(0).put("dooramount", amountrows.get(0).getString("dooramount"));
|
|
|
rows.get(0).put("amount", amountrows.get(0).getString("amount"));
|
|
|
+ rows.get(0).put("otheramount", amountrows.get(0).getString("otheramount"));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -761,6 +763,11 @@ public class workorder extends Controller {
|
|
|
} else {
|
|
|
updateNodesqlFactory.addParameter("dooramount", 0);
|
|
|
}
|
|
|
+ if (content.containsKey("otheramount") && content.getDouble("otheramount") > 0) {
|
|
|
+ updateNodesqlFactory.addParameter("otheramount", content.getBigDecimal("otheramount"));
|
|
|
+ } else {
|
|
|
+ updateNodesqlFactory.addParameter("otheramount", 0);
|
|
|
+ }
|
|
|
if (content.containsKey("accessoryamount") && content.getDouble("accessoryamount") > 0) {
|
|
|
updateNodesqlFactory.addParameter("accessoryamount", content.getBigDecimal("accessoryamount"));
|
|
|
} else {
|