|
|
@@ -37,6 +37,11 @@ public class tinvoiceapply extends PaoCust {
|
|
|
String[] fields = new String[]{"finvoicechecker", "finvoicepayee", "finvoiceclerk"};
|
|
|
copyFieldValue(tinvoiceapplySet.getPao(0), fields, this, fields);
|
|
|
}
|
|
|
+ if (getThisPaoSet().getApp().equalsIgnoreCase("INVOICEAPP")) {
|
|
|
+ setValue("ftype", "自动", 11L);
|
|
|
+ } else if (getThisPaoSet().getApp().equalsIgnoreCase("INVOICEOLD")) {
|
|
|
+ setValue("ftype", "手工", 11L);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -163,24 +168,27 @@ public class tinvoiceapply extends PaoCust {
|
|
|
}
|
|
|
|
|
|
public void check() throws P2Exception {
|
|
|
-// 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("checkby", getUserName(), 11L);
|
|
|
setValue("checkdate", getDateTime(), 11L);
|
|
|
|
|
|
//getPaoSet("tinvoicebill").selectAll();
|
|
|
//createBlueInvoice();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|