|
|
@@ -85,17 +85,20 @@ public class tinvoiceapply extends PaoCust {
|
|
|
if (tinvoiceapplyorderSet.min("finvoiceamount") <= 0) {
|
|
|
throw new P2AppException("", "땐데契역튿쏜띨극伎댕黨0");
|
|
|
}
|
|
|
-
|
|
|
+ boolean fcheckordermakeinv = getPaoSet("tagents").getPao(0).getBoolean("fcheckordermakeinv");
|
|
|
int i = 0;
|
|
|
PaoRemote detailpao = null;
|
|
|
while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
double finvoiceamount = detailpao.getDouble("finvoiceamount");//굶늴역튿쏜띨
|
|
|
-
|
|
|
PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
- PaoSetRemote saorder_receivedviewSet = saorderdetail.getPaoSet("saorder_receivedview");
|
|
|
double freceivedamount = 0;
|
|
|
- if (!saorder_receivedviewSet.isEmpty()) {
|
|
|
- freceivedamount = saorder_receivedviewSet.getPao(0).getDouble("freceivedamount");//땐데綠澗새쏜띨
|
|
|
+ if (fcheckordermakeinv) {
|
|
|
+ freceivedamount = saorderdetail.getDouble("frateamount");//땐데쏜띨
|
|
|
+ } else {
|
|
|
+ PaoSetRemote saorder_receivedviewSet = saorderdetail.getPaoSet("saorder_receivedview");
|
|
|
+ if (!saorder_receivedviewSet.isEmpty()) {
|
|
|
+ freceivedamount = saorder_receivedviewSet.getPao(0).getDouble("freceivedamount");//땐데綠澗새쏜띨
|
|
|
+ }
|
|
|
}
|
|
|
String fsonum = saorderdetail.getString("fsonum");//땐데뵀
|
|
|
String fitemname = saorderdetail.getString("fitemname");//�틔츰냔
|
|
|
@@ -159,6 +162,7 @@ public class tinvoiceapply extends PaoCust {
|
|
|
tinvoiceapplyorderSet.cleanup();
|
|
|
PaoSetRemote tinvoicebillSet = getPaoSet("tinvoicebill");
|
|
|
tinvoicebillSet.cleanup();
|
|
|
+
|
|
|
/****************** 데앴쇱駱 *********************/
|
|
|
if (ischeck) {
|
|
|
if (!"瓊슥".equals(getString("fstatus"))) {
|
|
|
@@ -178,16 +182,20 @@ public class tinvoiceapply extends PaoCust {
|
|
|
throw new P2AppException("", "땐데쏜띨뵨역튿쏜띨꼇寧鈴");
|
|
|
}
|
|
|
|
|
|
+ boolean fcheckordermakeinv = getPaoSet("tagents").getPao(0).getBoolean("fcheckordermakeinv");
|
|
|
int i = 0;
|
|
|
PaoRemote detailpao = null;
|
|
|
while ((detailpao = tinvoiceapplyorderSet.getPao(i)) != null) {
|
|
|
double finvoiceamount = detailpao.getDouble("finvoiceamount");//굶늴역튿쏜띨
|
|
|
-
|
|
|
PaoRemote saorderdetail = detailpao.getPaoSet("saorderdetail").getPao(0);
|
|
|
- PaoSetRemote saorder_receivedviewSet = saorderdetail.getPaoSet("saorder_receivedview");
|
|
|
double freceivedamount = 0;
|
|
|
- if (!saorder_receivedviewSet.isEmpty()) {
|
|
|
- freceivedamount = saorder_receivedviewSet.getPao(0).getDouble("freceivedamount");//땐데綠澗새쏜띨
|
|
|
+ if (fcheckordermakeinv) {
|
|
|
+ freceivedamount = saorderdetail.getDouble("frateamount");//땐데쏜띨
|
|
|
+ } else {
|
|
|
+ PaoSetRemote saorder_receivedviewSet = saorderdetail.getPaoSet("saorder_receivedview");
|
|
|
+ if (!saorder_receivedviewSet.isEmpty()) {
|
|
|
+ freceivedamount = saorder_receivedviewSet.getPao(0).getDouble("freceivedamount");//땐데綠澗새쏜띨
|
|
|
+ }
|
|
|
}
|
|
|
String fsonum = saorderdetail.getString("fsonum");//땐데뵀
|
|
|
String fitemname = saorderdetail.getString("fitemname");//�틔츰냔
|