|
@@ -175,34 +175,34 @@ public class tinvoiceapply extends PaoCust {
|
|
|
|
|
|
|
|
public void check(boolean ischeck) throws P2Exception {
|
|
public void check(boolean ischeck) throws P2Exception {
|
|
|
if (ischeck) {
|
|
if (ischeck) {
|
|
|
- if ("手工".equalsIgnoreCase(getString("ftype"))) {
|
|
|
|
|
- PaoSetRemote tinvoiceapplyorderSet = getPaoSet("tinvoiceapplyorder");
|
|
|
|
|
- int i = 0;
|
|
|
|
|
- PaoRemote detailpao = null;
|
|
|
|
|
- while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
|
|
- double finvoiceamount_detail = detailpao.getDouble("finvoiceamount");//本次开票金额
|
|
|
|
|
- PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
|
|
- double finvoiceamount_order = saorderdetail.getDouble("finvoiceamount");//订单已开票金额
|
|
|
|
|
- saorderdetail.setValue("finvoiceamount", Math.add(finvoiceamount_order, finvoiceamount_detail), 111L);
|
|
|
|
|
- i++;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if ("手工".equalsIgnoreCase(getString("ftype"))) {
|
|
|
|
|
+ PaoSetRemote tinvoiceapplyorderSet = getPaoSet("tinvoiceapplyorder");
|
|
|
|
|
+ int i = 0;
|
|
|
|
|
+ PaoRemote detailpao = null;
|
|
|
|
|
+ while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
|
|
+ double finvoiceamount_detail = detailpao.getDouble("finvoiceamount");//本次开票金额
|
|
|
|
|
+ PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
|
|
+ double finvoiceamount_order = saorderdetail.getDouble("finvoiceamount");//订单已开票金额
|
|
|
|
|
+ saorderdetail.setValue("finvoiceamount", Math.add(finvoiceamount_order, finvoiceamount_detail), 111L);
|
|
|
|
|
+ i++;
|
|
|
}
|
|
}
|
|
|
|
|
+ //}
|
|
|
setValue("fstatus", "审核", 11L);
|
|
setValue("fstatus", "审核", 11L);
|
|
|
setValue("checkby", getUserName(), 11L);
|
|
setValue("checkby", getUserName(), 11L);
|
|
|
setValue("checkdate", getDateTime(), 11L);
|
|
setValue("checkdate", getDateTime(), 11L);
|
|
|
} else {
|
|
} else {
|
|
|
- if ("手工".equalsIgnoreCase(getString("ftype"))) {
|
|
|
|
|
- PaoSetRemote tinvoiceapplyorderSet = getPaoSet("tinvoiceapplyorder");
|
|
|
|
|
- int i = 0;
|
|
|
|
|
- PaoRemote detailpao = null;
|
|
|
|
|
- while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
|
|
- double finvoiceamount_detail = detailpao.getDouble("finvoiceamount");//本次开票金额
|
|
|
|
|
- PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
|
|
- double finvoiceamount_order = saorderdetail.getDouble("finvoiceamount");//订单已开票金额
|
|
|
|
|
- saorderdetail.setValue("finvoiceamount", Math.sub(finvoiceamount_order, finvoiceamount_detail), 111L);
|
|
|
|
|
- i++;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //if ("手工".equalsIgnoreCase(getString("ftype"))) {
|
|
|
|
|
+ PaoSetRemote tinvoiceapplyorderSet = getPaoSet("tinvoiceapplyorder");
|
|
|
|
|
+ int i = 0;
|
|
|
|
|
+ PaoRemote detailpao = null;
|
|
|
|
|
+ while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
|
|
+ double finvoiceamount_detail = detailpao.getDouble("finvoiceamount");//本次开票金额
|
|
|
|
|
+ PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
|
|
+ double finvoiceamount_order = saorderdetail.getDouble("finvoiceamount");//订单已开票金额
|
|
|
|
|
+ saorderdetail.setValue("finvoiceamount", Math.sub(finvoiceamount_order, finvoiceamount_detail), 111L);
|
|
|
|
|
+ i++;
|
|
|
}
|
|
}
|
|
|
|
|
+ // }
|
|
|
setValue("fstatus", "提交", 11L);
|
|
setValue("fstatus", "提交", 11L);
|
|
|
setValue("checkby", "", 11L);
|
|
setValue("checkby", "", 11L);
|
|
|
setValue("checkdate", "", 11L);
|
|
setValue("checkdate", "", 11L);
|