Commit 331171b9 by wangguangchao

报错代码修改

parent 905f72e5
......@@ -7,6 +7,7 @@
<modules name="act" type="act"/>
<globalMethods name="isAccountTypNostro" codeText="@0005" moduleName="actmod"/>
<globalMethods name="getBranch" codeText="@0010" moduleName="actmod"/>
<globalMethods name="getActTypField" codeText="@0011" moduleName="actmod"/>
<globalMethods name="genCmpAccount" codeText="@0012" moduleName="actmod"/>
<globalMethods name="getTermTypField" codeText="@0013" moduleName="actmod"/>
<globalMethods name="getAccountBase" codeText="@0014" moduleName="actmod"/>
......
......@@ -21,7 +21,8 @@ static boolean actCal(String acttyp,Argument<String> argact,int chktyp,Argument<
{
errmsg.value = Platform.getText( #CT000003, argact.value );
boolVar = false;
return ; // #######TODO 改写 LABEL与GOTO #### goto ChkEnd
//return ; // #### goto ChkEnd
return boolVar;
}
}
else
......@@ -30,7 +31,8 @@ static boolean actCal(String acttyp,Argument<String> argact,int chktyp,Argument<
{
errmsg.value = Platform.getText( #CT000004, argact.value );
boolVar = false;
return ; // #######TODO 改写 LABEL与GOTO #### goto ChkEnd
//return ; // #### goto ChkEnd
return boolVar;
}
}
tmpAct = Platform.mid( argact.value, 1, 15 );
......@@ -60,7 +62,8 @@ static boolean actCal(String acttyp,Argument<String> argact,int chktyp,Argument<
{
argact.value = argact.value + Platform.toString( intVar );
boolVar = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto ChkEnd
//return ; // #### goto ChkEnd
return boolVar;
}
else
{
......@@ -74,13 +77,13 @@ static boolean actCal(String acttyp,Argument<String> argact,int chktyp,Argument<
boolVar = false;
errmsg.value = Platform.getText( #CT000005, intVar );
}
return ; // #######TODO 改写 LABEL与GOTO #### goto ChkEnd
//return ; // #### goto ChkEnd
return boolVar;
}
break;
case "N":
break;
}
// #######TODO 改写 LABEL与GOTO #### label ChkEnd
// #### label ChkEnd
return boolVar;
}
\ No newline at end of file
......@@ -5,13 +5,14 @@ static boolean checkBIC(String argbic)
if( Platform.len( argbic ) != 8 && Platform.len( argbic ) != 11 && Platform.len( argbic ) > 0 )
{
return false;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
}
String bic = Platform.trim( argbic );
String let = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
String num = "0123456789";
// position 1-4 Bank-Code A-Z are allowed
// position 5-6 Country-Code A-Z are allowed
int n = 1;
for(int i = 1;i <= 6;i++)
{
if( Platform.pos( let, Platform.mid( bic, i, 1 ) ) == 0 )
......@@ -19,9 +20,10 @@ static boolean checkBIC(String argbic)
// if substring is not found, return value is 0
return false;
}
n++;
}
// position 7 Location-Code A-Z and 2-9 are allowed
if( Platform.pos( let, Platform.mid( bic, i, 1 ) ) == 0 && Platform.pos( "23456789", Platform.mid( bic, 7, 1 ) ) == 0 )
if( Platform.pos( let, Platform.mid( bic, n, 1 ) ) == 0 && Platform.pos( "23456789", Platform.mid( bic, 7, 1 ) ) == 0 )
{
return false;
}
......@@ -42,6 +44,6 @@ static boolean checkBIC(String argbic)
}
}
return true;
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
}
\ No newline at end of file
......@@ -71,8 +71,8 @@ void getRolAndNam(Argument<String> rol,Argument<String> nam)
case "TR":
rol.value = "FIP";
break;
case "BP":
rol.value = "FIA";
//case "BP":
//rol.value = "FIA";
/**
$finflg = GetContent( "\\TRTCRE\\CREFINFLG" )
if $finflg == "X" then
......@@ -80,7 +80,7 @@ void getRolAndNam(Argument<String> rol,Argument<String> nam)
else
endif
**/
break;
//break;
default:
rol.value = "";
}
......
......@@ -24,7 +24,7 @@ void prtForFee(String rol,Argument<Integer> foramt)
}
if( Platform.compareTo(famt , 0)>0 )
{
foramt.value = famt;
foramt.value = famt.intValue();
Platform.printTempUsing( "cdtnot.entry2", forfeestr, fcur + Platform.fmtAmount( Platform.abs( famt ), fcur ));
}
}
......
......@@ -6,13 +6,13 @@ static void numchrcvt(int num,Argument<String> chr)
int num5 = 0;
String m1 = NULLSTR;
int m = 0;
if( num < 1000000000000 )
if( num < 1000000000000L )
{
num5 = num;
if( num < 1000000000000 && num > 999999999 )
if( num < 1000000000000L && num > 999999999 )
{
m1 = Platform.toString( num / 1000000000 );
if( num > 100000000000 )
if( num > 100000000000L )
{
m1 = Platform.mid( m1, 1, 3 );
}
......
......@@ -14,7 +14,7 @@ static void primprog(int num,String chr,Argument<String> cht)
mm = 1;
num = m;
}
Platform.primprog1( num, chr, chr );
Platform.primprog1( num, chr, new Argument<>(chr) );
if( mm == 1 )
{
chr = chr + " HUNDRED";
......@@ -25,7 +25,7 @@ static void primprog(int num,String chr,Argument<String> cht)
chr = chr + " AND ";
num = num5 - m * 100;
m3 = 0;
Platform.primprog1( num, chr, chr );
Platform.primprog1( num, chr, new Argument<>(chr) );
}
cht.value = chr;
......
......@@ -17,7 +17,7 @@ static void primprog1(int num,String chr,Argument<String> cht)
n = m - 1;
nm = "--1*8 152127334148";
nc = "TWENTY THIRTY FORTY FIVTY SIXTY SEVENTY EIGHTY NINTY";
Platform.readDigits( n, nm, nc, chr, chr );
Platform.readDigits( n, nm, nc, chr, new Argument<>(chr) );
if( m2 != 0 )
{
num = num - m * 10;
......@@ -29,14 +29,14 @@ static void primprog1(int num,String chr,Argument<String> cht)
n = num;
nm = "--1*5*101621263036424751";
nc = "ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN";
Platform.readDigits( n, nm, nc, chr, chr );
Platform.readDigits( n, nm, nc, chr, new Argument<>(chr) );
}
if( num < 20 && num > 10 )
{
n = num - 10;
nm = "--1*8 1524324048586775";
nc = "ELEVEN TWELVE THIRTEEN FORTEEN FIVTEEN SIXTEEN SEVENTEEN EIGHTEEN NINTEEN TWENTY";
Platform.readDigits( n, nm, nc, chr, chr );
Platform.readDigits( n, nm, nc, chr, new Argument<>(chr) );
}
}
cht.value = chr;
......
......@@ -23,6 +23,6 @@ static void readDigits(int nn,String s1,String s2,String s3,Argument<String> chr
j = j + 1;
}
}
while ( Platform.compareTo(Platform.mid( nc, j, 1 ), " " )) != 0;
while (( Platform.compareTo(Platform.mid( nc, j, 1 ), " " )) != 0);
}
\ No newline at end of file
......@@ -89,6 +89,8 @@ void savdoc(#smh argsmh)
String docfil = NULLSTR;
String docfxt = NULLSTR;
String tmpfdr = NULLSTR;
doneLabel:
while(true){
if( Platform.compareTo( $lev.getValue() , "5" ) == 0 )
{
// attachment
......@@ -115,7 +117,8 @@ void savdoc(#smh argsmh)
}
Platform.sdbInsert( argsmh );
$smhinr = $$argsmh\inr;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
//break;
case "FIL":
$$argsmh\cortyp = "FIL";
......@@ -145,13 +148,15 @@ void savdoc(#smh argsmh)
if( Platform.errorCode() != 0 )
{
Platform.sysDump( "Cannot create persistent copy of document in " + docfdr );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
}
$$argsmh\oriflg.setValue ( "F" );
Platform.sdbEtySetRec( argsmh, "", "" );
Platform.dbInsert( argsmh );
$smhinr = $$argsmh\inr;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
//break;
case "INT":
// document from this transaction just created or still to be created
......@@ -173,8 +178,8 @@ void savdoc(#smh argsmh)
}
Platform.sdbInsert( argsmh );
$smhinr = $$argsmh\inr;
return ; // #######TODO 改写 LABEL与GOTO #### goto done
break;
//return ; // #### goto done
break doneLabel;
default:
// attachment is a document that has to be created now
// SMH\CORTYP is set to the CORTYP of the content
......@@ -239,7 +244,8 @@ void savdoc(#smh argsmh)
if( Platform.errorCode() != 0 )
{
Platform.sysDump( "Cannot find document panel " + docruluse );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
}
if( Platform.isEmpty( $docuil ) )
{
......@@ -270,7 +276,8 @@ void savdoc(#smh argsmh)
if( Platform.errorCode() != 0 )
{
Platform.sysDump( "Cannot save document in " + docfdr );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
}
}
}
......@@ -295,7 +302,8 @@ void savdoc(#smh argsmh)
if( Platform.errorCode() != 0 )
{
Platform.sysDump( "Cannot save document in " + docfdr );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #### goto done
break doneLabel;
}
}
}
......@@ -349,6 +357,8 @@ void savdoc(#smh argsmh)
ignore = Platform.errorCode();
}
Platform.sdbUpdate( argsmh );
break doneLabel;
}
// #######TODO 改写 LABEL与GOTO #### label done
// any service triggered must determine on it`s own how to handle if SMH is an attachment
// (e.g. SRVTCO must not send on its own a TCO message forwarded as attachment via email)
......
......@@ -69,7 +69,6 @@ String determineConversion()
//$docexe = pathBox.value;
break;
case "TLX": // Telex
$docstr = "X";
Argument<String> pathBox3 = new Argument<String>("",$docexe.getValue());
......@@ -268,5 +267,4 @@ String determineConversion()
Platform.setErrorCode( 994, Platform.formatText( "Conversion for destination CORTYP $1 not specified in \'DetermineConversion\'", $cortyp.getValue() ) );
return "";
}
return "";
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ void popupStreamAsSwift(IStream docstream,String intitle,String indir,String inc
Platform.streamSet( $ascin.getValue(), docstream );
Platform.clear( $filename );
Platform.clear( $msgtxt );
Platform.setCn( 0 );
//Platform.setCn( 0 );
Platform.clear( $smh );
$lastfilename = $filename;
$smh\msgpos = 0;
......
......@@ -130,7 +130,7 @@ int splitMsg(IStream msg)
if( Platform.compareTo( orimt , "707" ) == 0 )
{
l = 0;
for(int idx = 1;idx <= Platform.streamCount( $ascin.getValue() );idx++)
for(idx = 1;idx <= Platform.streamCount( $ascin.getValue() );idx++)
{
line = rtrim( Platform.getLine( $ascin.getValue(), idx ) );
l = l + Platform.len( line );
......
......@@ -145,16 +145,16 @@ void splitMTSwt2018(int argidx,int arghealen)
while( sftIdx >= sftBegIdx && Platform.isEmpty( cod ) )
{
chkLin = Platform.getLine( $ascin.getValue(), sftIdx );
String subChkLin = Platform.MdaUtilsEx( chkLin, 1, 3 );
String subTagLin = MdaUtilsEx.mid(tagLin,1,3);
String subChkLin = Platform.mid( chkLin, 1, 3 );
String subTagLin = Platform.mid(tagLin,1,3);
// set the continuation code to be used
if(subChkLin == "/AD")
if(subChkLin.equals( "/AD"))
cod = "/ADD/";
else if(subChkLin == "/RE")
else if(subChkLin.equals("/RE"))
cod = "/REPALL/";
else if(subChkLin == "/DE")
else if(subChkLin.equals("/DE"))
cod = "/DELETE/";
else if(subChkLin == subTagLin){
else if(subChkLin.equals(subTagLin)){
// if the line holding the tag holds no /code/ do not set the code
if( Platform.compareTo( Platform.mid( chkLin, 6, 1 ) , "/" ) == 0 )
{
......
......@@ -94,17 +94,14 @@ static String getfeetxtinf(String feecod,String allcalflg,#fec fecuse,String fee
case "<":
return Platform.getText( #CT000178, txt );
// = GetText( 'R0000177
break;
case ">":
return Platform.getText( #CT000180, txt );
// = GetText( 'R0000179
break;
default:
return Platform.getText( #CT000176, txt );
// = GetText( 'R0000175
}
}
break;
case "2":
return Platform.getText( #CT000183, txt, rat, unt );
case "3":
......@@ -144,7 +141,6 @@ static String getfeetxtinf(String feecod,String allcalflg,#fec fecuse,String fee
{
return Platform.getText( #CT000059, txt, vrat, unttxt, pertyptxt, type );
}
break;
case "C":
case "*":
return Platform.getText( #CT000061, txt, vrat, unttxt, pertyptxt, type );
......@@ -152,7 +148,6 @@ static String getfeetxtinf(String feecod,String allcalflg,#fec fecuse,String fee
return txt;
}
}
break;
default:
switch( allcalflg )
{
......@@ -167,9 +162,10 @@ static String getfeetxtinf(String feecod,String allcalflg,#fec fecuse,String fee
}
}
// reset execution language
/**
if( uilChg )
{
Platform.setLang( oldlanguage );
}
}**/
}
\ No newline at end of file
......@@ -14,6 +14,6 @@ static void getLEDCbsPerDate(#ledgrp argled,String arginr,Date argdat)
Platform.cbsGetBalance( $$argled\cbs\opn1, $$argled\rec, "OPN", "AMT1", argdat );
Platform.getAamCbsPerDate( argled, argdat );
}
$$argled\pcropnamtsum = $\litp1\litb2b\ledlod.new BigDecimal(getLEDPCrOpnAmtSum( arginr, argdat ));
$$argled\pcropnamtsum = new BigDecimal($\litp1\litb2b\ledlod.getLEDPCrOpnAmtSum( arginr, argdat ));
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ static void isLETrnAllowed(#ledgrp argledgrp,String trnnam,Argument<String> argr
// A condition might inhibit the usage of the contract with the specified
// transaction by either setting $Res to false or by setting an errormessage
// into $MsgTxt.
String v$CR = NULLSTR;
String vCR = NULLSTR;
int cnt = 0;
String sql = NULLSTR;
switch( Platform.toUpper( trnnam ) )
......@@ -57,7 +57,7 @@ static void isLETrnAllowed(#ledgrp argledgrp,String trnnam,Argument<String> argr
if( ! Platform.isEmpty( $$argledgrp\rec\inr ) )
{
msgTxt = msgTxt + cr + errRsv;
v$CR = "\r\n";
vCR = "\r\n";
res = false;
}
break;
......@@ -242,7 +242,7 @@ static void isLETrnAllowed(#ledgrp argledgrp,String trnnam,Argument<String> argr
if( Platform.isEmpty( $$argledgrp\rec\inr ) )
{
msgTxt = msgTxt + cr + errRsv;
v$CR = "\r\n";
vCR = "\r\n";
res = false;
}
break;
......
......@@ -36,7 +36,7 @@ String printTenorsInSwift()
{
Platform.printTemp( #CT000038);
}
Platform.printTemp( Platform.getText( #CT000028, cur, $\trnmod.fmtAmountSwift( oldAmt + chgAmt, cur ), Platform.fmtDateShort( newMatDat ) ));
Platform.printTemp( Platform.getText( #CT000028, cur, $\trnmod.fmtAmountSwift( new BigDecimal(oldAmt + chgAmt), cur ), Platform.fmtDateShort( newMatDat ) ));
first = false;
}
}
......
......@@ -30,6 +30,6 @@ String liaallGetFeecodFucKey(String argbussec,String argcbtpfxlst)
}
}
}
return "";
//return "";
}
\ No newline at end of file
......@@ -15,6 +15,6 @@ boolean enableAmountZero(String cbtpfx)
{
return false;
}
return false;
//return false;
}
\ No newline at end of file
......@@ -45,12 +45,12 @@ void liaallSetCbeAmountDivAvlAvsInt(IModule mod,String cur,int amt)
{
for(int i = 1;i <= stmCnt;i++)
{
liaallSetCbeAmount( rol, 3, cur, -$\trnmod\liaget.trnmodGetTenorAmount( mod, Platform.getLine( cbtstm, i ) ), Platform.getLine( cbtstm, i ), mod );
liaallSetCbeAmount( rol, 3, cur, new BigDecimal(-$\trnmod\liaget.trnmodGetTenorAmount( mod, Platform.getLine( cbtstm, i ) )), Platform.getLine( cbtstm, i ), mod );
}
}
else
{
liaallSetCbeAmountDbtCdt( rol, 3, "", cur, -oldAllAmt, getConfirmationCbtLst(), mod, $avxgrpkey.getValue() );
liaallSetCbeAmountDbtCdt( rol, 3, "", cur, new BigDecimal(-oldAllAmt), getConfirmationCbtLst(), mod, $avxgrpkey.getValue() );
liaallSetAllowExchange( cbtLst, mod );
}
}
......@@ -93,7 +93,7 @@ void liaallSetCbeAmountDivAvlAvsInt(IModule mod,String cur,int amt)
else
{
// if AVXGRPKEY is set, book amount to that group
liaallSetCbeAmountDbtCdt( rol, 3, "", cur, amt, getConfirmationCbtLst(), mod, $avxgrpkey.getValue() );
liaallSetCbeAmountDbtCdt( rol, 3, "", cur, new BigDecimal(amt), getConfirmationCbtLst(), mod, $avxgrpkey.getValue() );
// allow exchange
liaallSetAllowExchange( cbtLst, mod );
}
......
......@@ -8,7 +8,7 @@ void bolGetReducedLia(Argument<String> argliacur,Argument<Integer> argliaamt)
{
if( ( Platform.compareTo($\liaall\liaallg[i]\cbtpfx, "AVL" )== 0 ) || ( Platform.compareTo($\liaall\liaallg[i]\cbtpfx, "DPU" )== 0 ) || ( Platform.compareTo($\liaall\liaallg[i]\cbtpfx, "DPZ" )== 0 ) || ( Platform.compareTo($\liaall\liaallg[i]\cbtpfx, "AKZ" )== 0 ) )
{
argliaamt.value = Platform.numAdd(argliaamt.value , ( $\liaall\liaallg[i]\amt ));
argliaamt.value = Platform.numAdd(argliaamt.value , ( $\liaall\liaallg[i]\amt )).intValue();
argliacur.value = $\liaall\liaallg[i]\cur;
}
}
......
......@@ -143,7 +143,7 @@ void registersettlementLiaZZ()
endif
**/
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, wrn, "LIAALLFEEWRN" + Platform.toString( i, -2 ) );
$\setmod\setfeg.addTrnFee ( "TRNLIA" + Platform.toString( i, -2 ),$\liaall\liaallg[i]\fee\cod.getValue(), sw, un, begdat, todat, 0, 0, "", "OBJMOD=" + Platform.getModuleInfo( $\liaall\liaallg[i]\ptegrp, tdModuleInfoFullName ) + "\r\n" + "FECMOD=" + Platform.getModuleInfo( $\liaall\liaallg[i]\fec, tdModuleInfoFullName ) + "\r\n" + "ROLDBT=" + roldbt + "\r\n" + "CBTPFX=" + $\liaall\liaallg[i]\cbtpfx.getValue() + "\r\n" + "CEXTID=" + $\liaall\liaallg[i]\extid.getValue() );
$\setmod\setfeg.addTrnFee ( "TRNLIA" + Platform.toString( i, -2 ),$\liaall\liaallg[i]\fee\cod.getValue(), sw, un, begdat, todat, BigDecimal.ZERO, BigDecimal.ZERO, "", "OBJMOD=" + Platform.getModuleInfo( $\liaall\liaallg[i]\ptegrp, tdModuleInfoFullName ) + "\r\n" + "FECMOD=" + Platform.getModuleInfo( $\liaall\liaallg[i]\fec, tdModuleInfoFullName ) + "\r\n" + "ROLDBT=" + roldbt + "\r\n" + "CBTPFX=" + $\liaall\liaallg[i]\cbtpfx.getValue() + "\r\n" + "CEXTID=" + $\liaall\liaallg[i]\extid.getValue() );
inccod = liaallParGet( "FEEINCCOD", $\liaall\liaallg[i]\cbtpfx.getValue() );
sw = "N";
un = 0;
......
......@@ -33,7 +33,7 @@ void xmlPrintTenorinfo()
{
if( chgAmt != 0 )
{
Platform.printTempUsing( "liaall.newtenor", cur, $\trnmod\trndoc.xmlFmtAmount( chgAmt, cur ), Platform.fmtDateLong( newMatDat ));
Platform.printTempUsing( "liaall.newtenor", cur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(chgAmt), cur ), Platform.fmtDateLong( newMatDat ));
}
}
else
......@@ -42,12 +42,12 @@ void xmlPrintTenorinfo()
{
if( oldMatDat != newMatDat )
{
Platform.printTempUsing( "liaall.newmatur", cur, $\trnmod\trndoc.xmlFmtAmount( oldAmt, cur ), Platform.fmtDateLong( newMatDat ), Platform.fmtDateLong( oldMatDat ));
Platform.printTempUsing( "liaall.newmatur", cur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(oldAmt), cur ), Platform.fmtDateLong( newMatDat ), Platform.fmtDateLong( oldMatDat ));
}
}
else
{
Platform.printTempUsing( "liaall.newamt", cur, $\trnmod\trndoc.xmlFmtAmount( chgAmt + oldAmt, cur ), $\trnmod\trndoc.xmlFmtAmount( oldAmt, cur ), Platform.fmtDateLong( newMatDat ), Platform.fmtDateLong( oldMatDat ));
Platform.printTempUsing( "liaall.newamt", cur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(chgAmt + oldAmt), cur ), $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(oldAmt), cur ), Platform.fmtDateLong( newMatDat ), Platform.fmtDateLong( oldMatDat ));
}
}
}
......
......@@ -33,13 +33,13 @@ void printTenorsInCoverForGrpkey(String arggrpkey)
{
if( first )
{
docAmt = $\trnmod\trndoc.xmlFmtCurAmt( tnrCur, oldAmt );
docAmt = $\trnmod\trndoc.xmlFmtCurAmt( tnrCur, new BigDecimal(oldAmt) );
Platform.printTempUsing( "liaall.Titltenor", docAmt);
}
}
else
{
Platform.printTempUsing( "liaall.tenorline", tnrCur, $\trnmod\trndoc.xmlFmtAmount( tnrAmt, tnrCur ), $\trnmod\trndoc.xmlFmtDate( "L", tnrMatdat ));
Platform.printTempUsing( "liaall.tenorline", tnrCur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(tnrAmt), tnrCur ), $\trnmod\trndoc.xmlFmtDate( "L", tnrMatdat ));
first = false;
}
}
......
......@@ -69,7 +69,7 @@ void xmlPrintSettledTenors(String argdbtrol,String argcdtrol)
}
if( ( ! Platform.isEmpty( oldMatDate ) && oldMatDate != matDate ) || ( ! Platform.isEmpty( oldCur ) && Platform.compareTo(oldCur, cur) != 0 ) )
{
Platform.printTempUsing( "trndoc.anytext", Platform.getText( #LI000327, oldCur, $\trnmod\trndoc.xmlFmtAmount( sumAmt, oldCur ), $\trnmod\trndoc.xmlFmtDate( "L", oldMatDate ) ));
Platform.printTempUsing( "trndoc.anytext", Platform.getText( #LI000327, oldCur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(sumAmt), oldCur ), $\trnmod\trndoc.xmlFmtDate( "L", oldMatDate ) ));
sumAmt = tenAmt;
}
else
......@@ -80,7 +80,7 @@ void xmlPrintSettledTenors(String argdbtrol,String argcdtrol)
oldCur = cur;
}
// print the last row
Platform.printTempUsing( "trndoc.anytext", Platform.getText( #LI000328, cur, $\trnmod\trndoc.xmlFmtAmount( sumAmt, cur ), $\trnmod\trndoc.xmlFmtDate( "L", matDate ) ));
Platform.printTempUsing( "trndoc.anytext", Platform.getText( #LI000328, cur, $\trnmod\trndoc.xmlFmtAmount( new BigDecimal(sumAmt), cur ), $\trnmod\trndoc.xmlFmtDate( "L", matDate ) ));
$\trnmod\trndoc.xmlPrtEmptyLine( 1 );
}
......
static void trnWriteLog(#trn argtrn)
{
String logFil = Platform.getFullName( "log", "trn." + Platform.format( Platform.today( tdContextTZSYSTEM ), "YYYYMMDD" ) + ".log" );
//String logFil = Platform.getFullName( "log", "trn." + Platform.format( Platform.today( tdContextTZSYSTEM ), "YYYYMMDD" ) + ".log" );
String logFil = Platform.getFullName( "log", "trn." + Platform.format( Platform.today( Calendar.getInstance().getTimeZone() ), "YYYYMMDD" ) + ".log" );
int ignore = 0;
String dir = NULLSTR;
String newFil = NULLSTR;
......
......@@ -8,6 +8,7 @@ static void cleanupClientTmpDir()
{
if( Platform.fileExists( "client:tmp" ) )
{
IStream filStr = new StreamImpl();
Platform.getDirStream( filStr, "client:tmp", "*.*", 0 );
if( Platform.errorCode() == 0 )
{
......
check subfields ($oitgrd\subbus,$oitgrd\subtyp) order 1000
{
/**
if( Platform.compareTo( $pansta.getValue() , PanStaAdd ) == 0 || Platform.compareTo( $pansta.getValue() , PanStaEdit ) == 0 )
{
if( ! Platform.isEmpty( $oitgrd\subtyp ) || ! Platform.isEmpty( $oitgrd\subbus ) )
......@@ -10,5 +11,5 @@ check subfields ($oitgrd\subbus,$oitgrd\subtyp) order 1000
}
}
}
**/
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ void det2cpr(boolean compress)
// if not to compress, all unmodified lines containing more than one fee have to be recalculated.
if( gridcnt > 0 )
{
for(int di = 1;di <= gridcnt;di++)
for(di = 1;di <= gridcnt;di++)
{
d = getintidx( di );
if( Platform.streamCount( $setfel[d]\fepinrlst.getValue() ) > 1 && Platform.compareTo( $setfel[d]\modflg , "r" ) == 0 )
......@@ -26,7 +26,7 @@ void det2cpr(boolean compress)
Platform.streamClear( $setfel[d]\fepinrlst.getValue() );
free = 1;
stmCnt = Platform.streamCount( inrs );
for(i = 1;i <= stmCnt;i++)
for(int i = 1;i <= stmCnt;i++)
{
if( i == 1 )
{
......
static void getRatcalfromsetfel(#setfeg mod,String rol,String feecod,Argument<Integer> ratcal)
{
// 获取费率
ratcal.value = 0.0000;
ratcal.value = 0;
int count = Platform.gridCount( $$mod\setfel );
String vrol = NULLSTR;
String vfeecod = NULLSTR;
......@@ -9,11 +9,11 @@ static void getRatcalfromsetfel(#setfeg mod,String rol,String feecod,Argument<In
{
for(int i = 1;i <= count;i++)
{
vrol = $$mod\setfel [i]\rol;
vfeecod = $$mod\setfel [i]\feecod;
vrol = $$mod\setfel.get(i).getRol();
vfeecod = $$mod\setfel.get(i).getFeecod();
if( Platform.compareTo( Platform.toUpper( vrol ) , Platform.toUpper( rol ) ) == 0 && Platform.compareTo( Platform.toUpper( vfeecod ) , Platform.toUpper( feecod ) ) == 0 )
{
ratcal.value = $$mod\setfel [i]\ratcal;
ratcal.value = $$mod\setfel.get(i).getRatcal().intValue();
if(1==1) return;
}
}
......
......@@ -3,7 +3,7 @@ static void getFinIntrast(#setfeg mod,String rol,String feecod,Argument<String>
//add cgl CODING
// 获取融资利率
intcur.value = "";
intamt.value = 0.00;
intamt.value = 0;
argdsp.value = "";
int count = Platform.gridCount( $$mod\setfel );
String vrol = NULLSTR;
......@@ -14,15 +14,15 @@ static void getFinIntrast(#setfeg mod,String rol,String feecod,Argument<String>
{
for(int i = 1;i <= count;i++)
{
vrol = $$mod\setfel [i]\rol;
vfeecod = $$mod\setfel [i]\feecod;
feecur = $$mod\setfel [i]\cur;
amt = $$mod\setfel [i]\amt;
vrol = $$mod\setfel.get(i).getRol();
vfeecod = $$mod\setfel.get(i).getFeecod();
feecur = $$mod\setfel.get(i).getCur();
amt = $$mod\setfel.get(i).getAmt();
if( Platform.compareTo( Platform.toUpper( vrol ) , Platform.toUpper( rol ) ) == 0 && Platform.compareTo( Platform.toUpper( vfeecod ) , Platform.toUpper( feecod ) ) == 0 )
{
intcur.value = feecur;
intamt.value = amt;
argdsp.value = $$mod\setfel [i]\dsp;
intamt.value = amt.intValue();
argdsp.value = $$mod\setfel.get(i).getDsp();
if(1==1) return;
}
}
......
......@@ -11,6 +11,7 @@ static String getStreamfield(String line,int posi,String sep)
String vline = line;
String vsep = sep;
int pos = 0;
int n = 1;
for(int i = 1;i <= posi - 1;i++)
{
pos = Platform.pos( vline, vsep );
......@@ -19,8 +20,9 @@ static String getStreamfield(String line,int posi,String sep)
break;
}
vline = Platform.mid( vline, pos + 1 );
n++;
}
if( i < posi - 1 )
if( n < posi - 1 )
{
txt = "";
}
......
......@@ -2,7 +2,7 @@ static void menuFitWidth()
{
//! Routine to be used in contextmenu when displaying a document
//! to fit the document into the width of the panel.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomWidth );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomWidth );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuZoom200()
{
//! Routine to be used in contextmenu when displaying a document
//! to show the document in 200% of the original size.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "200" );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "200" );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuZoom125()
{
//! Routine to be used in contextmenu when displaying a document
//! to show the document in 125% of the original size.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "125" );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "125" );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuZoom100()
{
//! Routine to be used in contextmenu when displaying a document
//! to show the document in 100% of the original size.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "100" );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "100" );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuZoom75()
{
//! Routine to be used in contextmenu when displaying a document
//! to show the document in 75% of the original size.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "75" );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "75" );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuZoom50()
{
//! Routine to be used in contextmenu when displaying a document
//! to show the document in 50% of the original size.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "50" );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, "50" );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuFitHeight()
{
//! Routine to be used in contextmenu when displaying a document
//! to fit the document into the heigth of the panel.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomHeight );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomHeight );
int ignore = Platform.errorCode();
}
\ No newline at end of file
......@@ -2,7 +2,7 @@ static void menuFitAllPages()
{
//! Routine to be used in contextmenu when displaying a document
//! show alle pages of the document in the panel.
Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomAllPages );
//Platform.setPanelOption( $\trnmod\docimm.getContextPanel(), tdPanelZoom, tdPanelZoomAllPages );
int ignore = Platform.errorCode();
}
\ No newline at end of file
static void tlbHlpDisplay()
{
//! Display context sensitive field help on hotkey / toolbar
java.lang.String field = GetFocusField;
java.lang.String field = Platform.GetFocusField();
String table = "";
IDatafield fldRef = null;
int popupLen = 0;
......@@ -67,7 +67,7 @@ static void tlbHlpDisplay()
{
Platform.setContext( tdContextHTMLBASEURL, ctxBas );
}
Platform.showHelpText( GetFocusFieldPos, hlp );
Platform.showHelpText( Platform.GetFocusFieldPos(), hlp );
}
}
......
......@@ -153,7 +153,7 @@ static void sysDump(String canceltext)
// If Sysdump occurs in routine LnkExit or the Userinterface is not available
// cancel does not return to application
call = Platform.toUpper( Platform.getLine( callStack, 3 ) );
if( Platform.pos( call, " LNKEXIT " ) > 0 || ( !( Platform.compareTo( bckGrd , "F") ) == 0 ) )
if( Platform.pos( call, " LNKEXIT " ) > 0 || ( !( Platform.compareTo( bckGrd , "F")== 0 ) ) )
{
// Update SSN-entry to reflect the cancel
if( ! Platform.isEmpty( $\sysmod\ssn\inr ) && Platform.compareTo($\sysmod\ssn\inr.getValue(), "NO") != 0 )
......
......@@ -9,8 +9,9 @@ static void menuPrint()
String trninr = "";
String strname = "";
int prompt = 0;
function panel = $\trnmod\docimm.getContextPanel();
String panel1 = Platform.getPanelInfo( panel, tdPanelFullName );
//function panel = $\trnmod\docimm.getContextPanel();
//String panel1 = Platform.getPanelInfo( panel, tdPanelFullName );
String panel1 = "";
String filename = "";
String title1 = "";
String filname = "";
......@@ -26,8 +27,9 @@ static void menuPrint()
filname = "chuanpiaodayin";
title = "SUBP\\SUBPENA";
}
Platform.setPanelOption( panel, "PRINTCONTEXT", #CT000382 );
boolean rtn = Platform.printText( $\trnmod\docimm.getContextPanel() );
//Platform.setPanelOption( panel, "PRINTCONTEXT", #CT000382 );
//boolean rtn = Platform.printText( $\trnmod\docimm.getContextPanel() );
boolean rtn = true;
int err = Platform.errorCode();
String errTxt = NULLSTR;
if( err <= 0 )
......
static void sptWriteLog(#spt argspt,String argfu)
{
String logFil = Platform.getFullName( "log", "spt." + Platform.format( Platform.today( tdContextTZSYSTEM ), "YYYYMMDD" ) + ".log" );
//String logFil = Platform.getFullName( "log", "spt." + Platform.format( Platform.today( tdContextTZSYSTEM ), "YYYYMMDD" ) + ".log" );
String logFil = Platform.getFullName( "log", "spt." + Platform.format( Platform.today( Calendar.getInstance().getTimeZone() ), "YYYYMMDD" ) + ".log" );
int ignore = 0;
String dir = NULLSTR;
String newFil = NULLSTR;
......
......@@ -20,18 +20,18 @@ static void internalCtxHlpHandle(String argaction)
popup = "";
}
// retrieve focusfield
java.lang.String focus = GetFocusField;
java.lang.String focus = Platform.GetFocusField();
IDatafield focusFld = Platform.getField( focus );
if( Platform.errorCode() <= 0 )
{
focus = Platform.getAttributeText( focusFld, tdAttrFullName );
}
// retrieve position of popup object if it has the focus
focus = GetFocusField;
focus = Platform.GetFocusField();
java.lang.String hlpPos = null;
if( Platform.compareTo( popup , focus ) == 0 )
{
hlpPos = GetFocusFieldPos;
hlpPos = Platform.GetFocusFieldPos();
}
else
{
......
......@@ -31,7 +31,6 @@ static String checkTRNType()
{
return "D";
}
break;
case "DBIADR":
case "DBAADR":
case "DBEADR":
......@@ -53,7 +52,6 @@ static String checkTRNType()
{
return "D";
} //静态数据类型交易下放到收单行
break;
default:
return "D"; //大集中交易
}
......
......@@ -31,7 +31,7 @@ static String upBCHKEYsqlofbch(String bchnam)
// StreamSet( BCHSTREAM, $BRANCHinr )
Platform.sqlSetDirtyRead();
sql = "SELECT INR FROM BCH WHERE UPBRANCH = '" + $\sysmod\bch\branch.getValue() + "'";
Platform.dbExecuteSql( sql, errmsg );
Platform.dbExecuteSql( sql );
if( Platform.errorCode() != 0 )
{
Platform.dbCloseCursor();
......
......@@ -71,6 +71,7 @@ static String getConterBankPath(String objtyp)
$path = "\\" + objtyp + "GRP\\BU2"
endif**/
break;
/**
case "TRD":
if( Platform.compareTo( Platform.mid( Platform.getTransName(), 1, 2 ) , "TR" ) == 0 )
{
......@@ -81,6 +82,7 @@ static String getConterBankPath(String objtyp)
path = "\\TRTCRE\\" + objtyp + "GRP\\FIP";
}
break;
**/
default:
// hoping that in future product modules the client will always be CLI
path = "\\" + objtyp + "GRP\\OTH";
......
static void dbFetchStreamWithINR(IStream strm,IModule tbl,String sql)
static void ddbFetchStreamWithINR(IStream strm,IModule tbl,String sql)
{
Platform.streamClear( strm );
boolean bool = false;
......
......@@ -87,7 +87,9 @@ static int sdbReadForNoINR(IModule rec,String line)
{
idx = streamCount;
}
return ; // #######TODO 改写 LABEL与GOTO #### goto found
//return ; // #### goto found
line = Platform.mid( line, pos + 1 );
pos = Platform.pos( line, "\t" );
}
if( idx == feldCnt2 )
{
......@@ -101,7 +103,9 @@ static int sdbReadForNoINR(IModule rec,String line)
{
idx = streamCount;
}
return ; // #######TODO 改写 LABEL与GOTO #### goto found
//return ; // #### goto found
line = Platform.mid( line, pos + 1 );
pos = Platform.pos( line, "\t" );
}
if( idx == feldCnt3 )
{
......@@ -115,7 +119,9 @@ static int sdbReadForNoINR(IModule rec,String line)
{
idx = streamCount;
}
return ; // #######TODO 改写 LABEL与GOTO #### goto found
//return ; // #### goto found
line = Platform.mid( line, pos + 1 );
pos = Platform.pos( line, "\t" );
}
if( idx == feldCnt4 )
{
......@@ -129,7 +135,9 @@ static int sdbReadForNoINR(IModule rec,String line)
{
idx = streamCount;
}
return ; // #######TODO 改写 LABEL与GOTO #### goto found
//return ; // #### goto found
line = Platform.mid( line, pos + 1 );
pos = Platform.pos( line, "\t" );
}
if( idx == feldCnt5 )
{
......@@ -143,38 +151,44 @@ static int sdbReadForNoINR(IModule rec,String line)
{
idx = streamCount;
}
return ; // #######TODO 改写 LABEL与GOTO #### goto found
}
// #######TODO 改写 LABEL与GOTO #### label found
//return ; // #### goto found
line = Platform.mid( line, pos + 1 );
pos = Platform.pos( line, "\t" );
}
// #### label found
//line = Platform.mid( line, pos + 1 );
//pos = Platform.pos( line, "\t" );
}
if( numberOfKeys == 1 )
{
Platform.dbRead( rec, text1, field1 );
err = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto ende
//return ; // #### goto ende
return err;
}
if( numberOfKeys == 3 )
{
Platform.dbRead( rec, text1, field1, text2, field2, text3, field3 );
err = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto ende
//return ; // #### goto ende
return err;
}
if( numberOfKeys == 4 )
{
Platform.dbRead( rec, text1, field1, text2, field2, text3, field3, text4, field4 );
err = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto ende
//return ; // #### goto ende
return err;
}
if( numberOfKeys == 5 )
{
Platform.dbRead( rec, text1, field1, text2, field2, text3, field3, text4, field4, text5, field5 );
err = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto ende
//return ; // #### goto ende
return err;
}
}
// #######TODO 改写 LABEL与GOTO #### label ende
// #### label ende
return err;
}
\ No newline at end of file
......@@ -85,6 +85,7 @@ static void readCurrency(String cur1,Argument<String> cur2,Argument<String> cur3
vcur2 = "加拿大元";
vcur3 = "Canadian Dollar";
break;
/**
case "GBP":
vcur2 = "英镑";
vcur3 = "British Pound";
......@@ -93,6 +94,7 @@ static void readCurrency(String cur1,Argument<String> cur2,Argument<String> cur3
vcur2 = "德国马克";
vcur3 = "German Marks";
break;
**/
case "CHF":
vcur2 = "瑞士法郎";
vcur3 = "Swiss Francs";
......
......@@ -2,7 +2,7 @@ static void getACTInformation()
{
//! ! 注意修改此函数必须同时修改:getACTInformation_set !!!!!!!!
//! 获取账号信息
java.lang.String field = GetFocusField;
java.lang.String field = Platform.GetFocusField();
IStream docMods = new StreamImpl();
Platform.streamClear( docMods );
String ins = NULLSTR;
......
......@@ -2,7 +2,7 @@ static void getACTInformationNew()
{
//! ! 注意修改此函数必须同时修改:getACTInformation_set !!!!!!!!
//! 获取账号信息
java.lang.String field = GetFocusField;
java.lang.String field = Platform.GetFocusField();
IStream docMods = new StreamImpl();
Platform.streamClear( docMods );
String ins = NULLSTR;
......
......@@ -11,6 +11,7 @@ static String getStreamfields2(String line,int posi,String sep)
String vline = line;
String vsep = sep;
int pos = 0;
int n = 1;
for(int i = 1;i <= posi - 1;i++)
{
pos = Platform.pos( vline, vsep );
......@@ -19,8 +20,9 @@ static String getStreamfields2(String line,int posi,String sep)
break;
}
vline = Platform.mid( vline, pos + 1 );
n++;
}
if( i < posi - 1 )
if( n < posi - 1 )
{
txt = "";
}
......
......@@ -23,7 +23,9 @@ static String getSwitchFromLine(String argswt,String arglin)
int beg = 1;
int err = 0;
String cnt = "";
// #######TODO 改写 LABEL与GOTO #### label NxtSwt
// #### label NxtSwt
NxtSwtLabel:
while(true){
int pos = Platform.pos( Platform.mid( cmd, beg ), " -" );
String fndSwt = NULLSTR;
boolean trimflg = false;
......@@ -34,7 +36,8 @@ static String getSwitchFromLine(String argswt,String arglin)
fndSwt = Platform.toLower( Platform.mid( cmd, beg, len + 1 ) );
if( Platform.compareTo(fndSwt, swt) != 0 )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto NxtSwt
//return ; // #### goto NxtSwt
continue NxtSwtLabel;
}
else
{
......@@ -90,6 +93,8 @@ static String getSwitchFromLine(String argswt,String arglin)
{
Platform.setErrorCode( -2, Platform.formatText( "Switch $1 not found", argswt ) );
}
break NxtSwtLabel;
}
return cnt;
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ static boolean checkgletimeandamt(String trninr)
int sumamt2 = 0;
int begtim1 = 0;
int endtim1 = 0;
int time = 0;
if( count > 0 )
{
if( Platform.compareTo( flgchk , "Y" ) == 0 )
......
......@@ -33,7 +33,7 @@ void defDocEot(String trigger,String subid,String argdocpannam,String apfcod,int
//! adrblk (optional)
//! address of addressee (do not pass if it should be derived from PTSPTA in objmod, if set it is used as address of the message to be able to pass a letter to a different address (e.g. attatchment to beneficiary sent to advising bank)
// allow customer specific implementation for mandatory flag
Platform.defDocEotCUS( mandatoryflag );
Platform.defDocEotCUS( new Argument<Integer>(mandatoryflag+"") );
// id for primary message has maximum 12 digits (to leave 3 additional digits for secondary entries
String id = Platform.mid( trigger, 1, 3 ) + Platform.mid( subid, 1, 9 );
// retrieve module objmod
......
......@@ -63,7 +63,46 @@ String docEOTadddoc(String refid,String refsubid,String argcortyp,String argorif
if( Platform.isEmpty( $doceot[i]\id ) )
{
fnd = i;
return ; // #######TODO 改写 LABEL与GOTO #### goto setit
//return ; // #### goto setit
if( i > 0 )
{
$doceot[i]\id = id;
$doceot[i]\lev = "2";
$doceot[i]\idref = refid;
$doceot[i]\docnam = $doceot[refidx]\docnam;
$doceot[i]\ptainr = ptainr;
$doceot[i]\objmod = $doceot[refidx]\objmod;
$doceot[i]\role = $doceot[refidx]\role;
$doceot[i]\roladr = "OTH";
$doceot[i]\oldptyinr = "";
$doceot[i]\oriflg = argoriflg;
$doceot[i]\mliflg = argmliflg;
$doceot[i]\adrblk = adrblk;
$doceot[i]\cortyp = argcortyp;
$doceot[i]\oldapfcod = triggerapf;
$doceot[i]\oldptyinr = "";
$doceot[i]\mdtflg = mandatoryflag;
$doceot[i]\usdflg = 0;
$doceot[i]\apfcpymli = -1;
$doceot[i].setSRTKEY();
$doceot[i].setAddressingInfo();
$doceot[i]\docstrsea = $doceot[refidx]\docstrsea;
$doceot[i].setDOCCORSEA();
$doceot[i].setCORTYP();
if( ! Platform.isEmpty( argcortyp ) )
{
// if CORTYP was passed as argument, use this
$doceot[i]\cortyp = argcortyp;
}
$doceot[i].setLang();
$doceot[i]\apf = "CPY";
$doceot[i].setApf ( false );
$doceot[i].setPanDsc();
$doceot[i].setOldValues();
Platform.enable( $doceot[i]\butadd );
Platform.visible( $doceot[i] );
}
return id;
}
}
}
......@@ -79,7 +118,7 @@ String docEOTadddoc(String refid,String refsubid,String argcortyp,String argorif
fnd = gridcnt;
int i = fnd;
// set line in DOCEOT
// #######TODO 改写 LABEL与GOTO #### label setit
// #### label setit
if( i > 0 )
{
$doceot[i]\id = id;
......
......@@ -57,7 +57,7 @@ void setMLI(String id,String apf,String ptyinr)
String ptainr = "";
String cortyp = "";
String oriflg = "";
Platform.dbExecuteSql( sql, msg );
Platform.dbExecuteSql( sql );
if( Platform.errorCode() > 0 )
{
Platform.dbCloseCursor();
......
......@@ -8,7 +8,7 @@ String printTcoTagM2(String main,String preadvdt)
int i = getDoceotLineForDocId( main );
if( i == 0 )
{
if(1==1) return;
if(1==1) return "";
}
String txt = NULLSTR;
switch( $doceot[i]\cortyp.getValue() )
......
String printSizedBlock(String tag,String txt,int lines,int lngt) global
String printSizedBlock(String tag,String txt,int lines,int lngt)
{
Platform.mallocPrintBuffer();
//! function to print a block within size limitations, adding a comment if cut off at end
......
......@@ -12,6 +12,7 @@ String xmlFmtAnyFld(IDatafield argfield)
BigDecimal amt = null;
String codeTbl = NULLSTR;
Date date = null;
String tdAttrCurrency = null;
switch( nam )
{
case "ADRBLK":
......
......@@ -8,6 +8,7 @@ void xmlGetAllFldMod(IStream argstream,IModule argmodule)
// ArgModule = Module that should be analyzed, e.g. LITP.
// get all modified fields at any module (without submodules)
IStream fldStm = new StreamImpl();
int tdModuleModifiedFields = 0;
Platform.getModuleInfoStream( fldStm, argmodule, tdModuleModifiedFields );
String modNam = NULLSTR;
int stmCnt = 0;
......
......@@ -24,11 +24,11 @@ void docTRESetButtons(int arglineidx)
// if Level is "Original" or generated by MLI or generated as xxA attachment
if( Platform.compareTo($doceot[idx]\lev, "1" )== 0 || ! Platform.isEmpty( $doceot[idx]\mliflg ) || ( Platform.compareTo($doceot[idx]\lev, "5" )== 0 && ( ! Platform.isEmpty( $doceot[idx]\docnam ) || Platform.compareTo( $doceot[idx]\atttyp , "INT" ) == 0 ) ) )
{
Platform.setDescription( $butdel.getValue(), #CT001076 );
//Platform.setDescription( $butdel.getValue(), #CT001076 );
}
else
{
Platform.setDescription( $butdel.getValue(), #CT001077 );
//Platform.setDescription( $butdel.getValue(), #CT001077 );
}
// Disable Delete if mandatory flag is set
if( $doceot[idx]\mdtflg == 1 )
......@@ -69,17 +69,17 @@ void docTRESetButtons(int arglineidx)
idx = getDOCEOTSelIdx( arglineidx );
if( ! Platform.isEmpty( $doceot[idx]\mliflg ) || ( Platform.compareTo($doceot[idx]\lev, "5" )== 0 && ( ! Platform.isEmpty( $doceot[idx]\docnam ) || Platform.compareTo( $doceot[idx]\atttyp , "INT" ) == 0 ) ) )
{
Platform.setDescription( $butdel.getValue(), #CT001103 );
//Platform.setDescription( $butdel.getValue(), #CT001103 );
}
else
{
if( Platform.isEmpty( $doceot[idx]\atttyp ) )
{
Platform.setDescription( $butdel.getValue(), #CT001104 );
//Platform.setDescription( $butdel.getValue(), #CT001104 );
}
else
{
Platform.setDescription( $butdel.getValue(), #CT001105 );
//Platform.setDescription( $butdel.getValue(), #CT001105 );
}
}
if( Platform.isEmpty( $doceot[idx]\attinr ) )
......
......@@ -15,7 +15,39 @@ String createDocument(String argrol,String argptainr,String argdsc)
if( Platform.compareTo( id , $doceot[i]\id ) == 0 )
{
fnd = i;
return ; // #######TODO 改写 LABEL与GOTO #### goto setit
//return ; // #### goto setit
String docnam = NULLSTR;
if( i > 0 )
{
docnam = "CoverA";
$doceot[i]\id = id;
$doceot[i]\lev = "4";
$doceot[i]\idref = "";
$doceot[i]\apfcpymli = -1;
$doceot[i]\docnam = docnam;
$doceot[i]\ptainr = argptainr;
$doceot[i]\argptainr = argptainr;
$doceot[i]\pandsc = argdsc;
$doceot[i]\role = argrol;
$doceot[i]\roladr = argrol;
$doceot[i]\adrblk = "";
$doceot[i]\mdtflg = 0;
$doceot[i]\apf = "";
$doceot[i]\oldapf = "";
$doceot[i]\usdflg = 0;
$doceot[i].setSRTKEY();
$doceot[i].setAddressingInfo();
$doceot[i]\docstrsea = getStructures( docnam );
$doceot[i]\doccorsea = getCORTYPHavingAttachment();
$doceot[i]\cortyp = "";
$doceot[i]\valcortyp = "";
$doceot[i].setLang();
$doceot[i].setApf ( false );
$doceot[i]\idatt = "";
$doceot[i]\atttyp = "";
$doceot[i]\attinr = "";
}
return id;
}
}
}
......@@ -28,7 +60,39 @@ String createDocument(String argrol,String argptainr,String argdsc)
if( Platform.isEmpty( $doceot[i]\id ) )
{
fnd = i;
return ; // #######TODO 改写 LABEL与GOTO #### goto setit
//return ; // #### goto setit
String docnam = NULLSTR;
if( i > 0 )
{
docnam = "CoverA";
$doceot[i]\id = id;
$doceot[i]\lev = "4";
$doceot[i]\idref = "";
$doceot[i]\apfcpymli = -1;
$doceot[i]\docnam = docnam;
$doceot[i]\ptainr = argptainr;
$doceot[i]\argptainr = argptainr;
$doceot[i]\pandsc = argdsc;
$doceot[i]\role = argrol;
$doceot[i]\roladr = argrol;
$doceot[i]\adrblk = "";
$doceot[i]\mdtflg = 0;
$doceot[i]\apf = "";
$doceot[i]\oldapf = "";
$doceot[i]\usdflg = 0;
$doceot[i].setSRTKEY();
$doceot[i].setAddressingInfo();
$doceot[i]\docstrsea = getStructures( docnam );
$doceot[i]\doccorsea = getCORTYPHavingAttachment();
$doceot[i]\cortyp = "";
$doceot[i]\valcortyp = "";
$doceot[i].setLang();
$doceot[i].setApf ( false );
$doceot[i]\idatt = "";
$doceot[i]\atttyp = "";
$doceot[i]\attinr = "";
}
return id;
}
}
}
......@@ -37,7 +101,7 @@ String createDocument(String argrol,String argptainr,String argdsc)
fnd = gridcnt - 9;
int i = fnd;
// set line in DOCEOT
// #######TODO 改写 LABEL与GOTO #### label setit
// #### label setit
String docnam = NULLSTR;
if( i > 0 )
{
......
......@@ -31,7 +31,37 @@ String createAttachment(String argid,String argdsc,String argatttyp,String argat
if( Platform.compareTo( id , $doceot[i]\id ) == 0 )
{
fnd = i;
return ; // #######TODO 改写 LABEL与GOTO #### goto setit
//return ; // #### goto setit
if( i > 0 )
{
$doceot[i]\id = id;
$doceot[i]\lev = "5";
$doceot[i]\idref = idref;
$doceot[i]\apfcpymli = -1;
$doceot[i]\docnam = "";
$doceot[i]\ptainr = $doceot[dOCEOTidx]\ptainr;
$doceot[i]\argptainr = $doceot[dOCEOTidx]\ptainr;
$doceot[i]\objmod = $doceot[dOCEOTidx]\objmod;
$doceot[i]\pandsc = argdsc;
$doceot[i]\role = $doceot[dOCEOTidx]\role;
$doceot[i]\adrblk = "";
$doceot[i]\mdtflg = 0;
$doceot[i]\apf = $doceot[dOCEOTidx]\apf;
$doceot[i]\oldapf = $doceot[i]\apf; // remember original apf
$doceot[i]\usdflg = 0;
$doceot[i].setAddressingInfo();
$doceot[i]\docstrsea = "";
$doceot[i]\doccorsea = newCORTYP + " ";
$doceot[i]\cortyp = newCORTYP;
$doceot[i]\valcortyp = newCORTYP;
$doceot[i]\idatt = argid;
$doceot[i]\atttyp = argatttyp;
$doceot[i]\attinr = argattinr;
$doceot[i].setLang();
$doceot[i].setApf ( false );
$doceot[i].setSRTKEY();
}
return id;
}
}
}
......@@ -44,7 +74,37 @@ String createAttachment(String argid,String argdsc,String argatttyp,String argat
if( Platform.isEmpty( $doceot[i]\id ) )
{
fnd = i;
return ; // #######TODO 改写 LABEL与GOTO #### goto setit
//return ; // #### goto setit
if( i > 0 )
{
$doceot[i]\id = id;
$doceot[i]\lev = "5";
$doceot[i]\idref = idref;
$doceot[i]\apfcpymli = -1;
$doceot[i]\docnam = "";
$doceot[i]\ptainr = $doceot[dOCEOTidx]\ptainr;
$doceot[i]\argptainr = $doceot[dOCEOTidx]\ptainr;
$doceot[i]\objmod = $doceot[dOCEOTidx]\objmod;
$doceot[i]\pandsc = argdsc;
$doceot[i]\role = $doceot[dOCEOTidx]\role;
$doceot[i]\adrblk = "";
$doceot[i]\mdtflg = 0;
$doceot[i]\apf = $doceot[dOCEOTidx]\apf;
$doceot[i]\oldapf = $doceot[i]\apf; // remember original apf
$doceot[i]\usdflg = 0;
$doceot[i].setAddressingInfo();
$doceot[i]\docstrsea = "";
$doceot[i]\doccorsea = newCORTYP + " ";
$doceot[i]\cortyp = newCORTYP;
$doceot[i]\valcortyp = newCORTYP;
$doceot[i]\idatt = argid;
$doceot[i]\atttyp = argatttyp;
$doceot[i]\attinr = argattinr;
$doceot[i].setLang();
$doceot[i].setApf ( false );
$doceot[i].setSRTKEY();
}
return id;
}
}
}
......@@ -53,7 +113,7 @@ String createAttachment(String argid,String argdsc,String argatttyp,String argat
fnd = gridcnt - 9;
int i = fnd;
// set line in DOCEOT
// #######TODO 改写 LABEL与GOTO #### label setit
// #### label setit
if( i > 0 )
{
$doceot[i]\id = id;
......
......@@ -24,11 +24,11 @@ void displayDocument(String argobjtyp,String argobjinr,String argidref)
break;
case "EOT":
//Show the original line, the ID is equal to ATTINR
for(int idx = 1;idx <= Platform.gridCount( $doceot );idx++)
for(int idxN = 1;idxN <= Platform.gridCount( $doceot );idxN++)
{
if( Platform.compareTo( $doceot[idx]\id , argobjinr ) == 0 )
if( Platform.compareTo( $doceot[idxN]\id , argobjinr ) == 0 )
{
butshw = Platform.getField( Platform.getModuleInfo( this, tdModuleInfoFullName ) + "\\DOCEOT(" + Platform.toString( idx ) + ")\\BUTSHW" );
butshw = Platform.getField( Platform.getModuleInfo( this, tdModuleInfoFullName ) + "\\DOCEOT(" + Platform.toString( idxN ) + ")\\BUTSHW" );
Platform.postEventRule( butshw );
break;
}
......
......@@ -10,7 +10,6 @@ event $butatt order 1000
case "R":
Platform.errorMessage( #CT001096 );
Platform.exitEvent();
break;
case "D":
dOCEOTidx = getDOCEOTSelIdx( lineidx );
break;
......
......@@ -14,7 +14,6 @@ event $filrecv order 1000
case "R":
Platform.errorMessage( #CT001112 );
Platform.exitEvent();
break;
case "D":
dOCEOTidx = getDOCEOTSelIdx( lineidx );
break;
......
......@@ -56,7 +56,8 @@ String getNormalizedFilename(String arg)
// replace illegal characters
int lastpos = 0;
int p = 0;
for(int i = 1;i <= Platform.len( name );i++)
int i = 0;
for(i = 1;i <= Platform.len( name );i++)
{
p = Platform.pos( "._-0123456789abcdefghijklmnopqrstuvwxyz", Platform.mid( name, i, 1 ) );
if( p <= 0 || ( p == 1 && lastpos == 1 ) )
......
......@@ -13,7 +13,7 @@ String swtPrtMT410(IModule arggroup)
BigDecimal matpercnt = Platform.getContentNumeric( grpPath + "\\REC\\MATPERCNT" );
String matperbeg = Platform.getContent( grpPath + "\\REC\\MATPERBEG" );
String matpertyp = Platform.getContent( grpPath + "\\REC\\MATPERTYP" );
Platform.printTemp( swtPrtTagAmountABK( "32", "ABK", doccur, docamt, matdat, matpercnt, matperbeg, matpertyp ) );
Platform.printTemp( swtPrtTagAmountABK( "32", "ABK", doccur, docamt, matdat, matpercnt.intValue(), matperbeg, matpertyp ) );
Platform.printTemp( swtPrtFmtBlk( ":72:", Platform.getDatafield($doccur,"addstr") ) );
Platform.printTemp( swtPrtEndTag( "SWT" ));
......
......@@ -57,7 +57,7 @@ String coverta()
txt = txt + cr + "Note: " + "\r\n" + $doccur\addstr.getValue();
cr = "\r\n";
}
Platform.printTemp( printSizedBlock( "79", txt, 999, 65 ) //TCO doku says 35x65 chars, splitting OK?);
Platform.printTemp( printSizedBlock( "79", txt, 999, 65 )); //TCO doku says 35x65 chars, splitting OK?);
Platform.printTemp( swtPrtEndTag( "TCO" ));
return Platform.releasePrintBuffer();
......
......@@ -11,5 +11,5 @@ String getTagFieldA3()
default:
// nothing to do, because Tag A3 is used in DTA/ DTE messages only
}
return "";
}
\ No newline at end of file
......@@ -30,7 +30,7 @@ String swtPrtAccAdrAD(String argtag,#ptspta argptspta)
{
if( Platform.isEmpty( $$argptspta\pts\adrblk ) )
{
if(1==1) return;
if(1==1) return "";
}
Platform.printTemp( tag + "D:" + acclin );
$$argptspta\pts\adrblk = Platform.convertBlock( $$argptspta\pts\adrblk.getValue(), 1, 4, 35 );
......
......@@ -21,7 +21,7 @@ String swtPrtAdrAD(String argtag,#ptspta argptspta)
{
if( Platform.isEmpty( $$argptspta\pts\adrblk ) )
{
if(1==1) return;
if(1==1) return "";
}
Platform.printTemp( tag + "D:" );
$$argptspta\pts\adrblk = Platform.convertBlock( $$argptspta\pts\adrblk.getValue(), 1, 4, 35 );
......
......@@ -21,7 +21,7 @@ String swtPrtTagM04(String argmod,String argmt)
if( Platform.errorCode() > 0 )
{
Platform.reraise();
if(1==1) return;
if(1==1) return "";
}
}
// Content of M4 is Name + Phone number for some DTE messages. In all other cases just name.
......
......@@ -3,7 +3,14 @@ static void printContactLineDate(Date dat)
Platform.setProperty( tdUnit, tdUnitmm );
Platform.beginarea ( 32, 69, 160, 10 );
String userid = Platform.getLoginUser();
Platform.GetUser( Platform.toUpper( userid ), nam, prf, uil, secSta, dsg, adm );
Argument<String> namArg = new Argument<String>();
Argument<String> prfArg = new Argument<String>();
Argument<String> uilArg = new Argument<String>();
Argument<String> secStaArg = new Argument<String>();
Argument<String> dsgArg = new Argument<String>();
Argument<String> admArg = new Argument<String>();
Platform.GetUser( Platform.toUpper( userid ), namArg, prfArg, uilArg, secStaArg, dsgArg, admArg );
Platform.dbRead( $\trnmod\wrkusr, userid, "EXTKEY" );
String tel = NULLSTR;
if( Platform.errorCode() != 0 )
......@@ -14,7 +21,7 @@ static void printContactLineDate(Date dat)
{
tel = $\trnmod\wrkusr\tel;
}
Platform.printTempUsing( "trndoc.contactline", nam, tel, Platform.fmtDateLong( dat ));
Platform.printTempUsing( "trndoc.contactline", namArg.value, tel, Platform.fmtDateLong( dat ));
Platform.endarea();
}
\ No newline at end of file
......@@ -31,7 +31,6 @@ event $butattapy order 1000
case "R":
Platform.errorMessage( #CT001186 );
Platform.exitEvent();
break;
case "D":
dOCEOTidx = getDOCEOTSelIdx( lineidx );
break;
......
......@@ -107,6 +107,7 @@ static void printfoothzcopy(boolean flag,Argument<String> chargescur,Argument<In
totalcur = cur;
totalamt = Platform.numAdd(amt , mailamt);
String txt6 = NULLSTR;
/**
switch( rol )
{
case ownrol:
......@@ -117,12 +118,28 @@ static void printfoothzcopy(boolean flag,Argument<String> chargescur,Argument<In
case opprol:
txt6 = "对方";
chargescur.value = cur;
chargesamt.value = totalamt;
chargesamt.value = totalamt.intValue();
break;
default:
txt6 = "";
chargescur.value = "";
chargesamt.value = 0;
}**/
if(rol.equals(ownrol)){
txt6 = "我方";
chargescur.value = "";
chargesamt.value = 0;
}else if(rol.equals(opprol)){
txt6 = "对方";
chargescur.value = cur;
chargesamt.value = totalamt.intValue();
}else{
txt6 = "";
chargescur.value = "";
chargesamt.value = 0;
}
String txt7 = NULLSTR;
if( Platform.compareTo( dsp , "X" ) == 0 )
......
......@@ -109,6 +109,7 @@ static void printfoothzcopy3(boolean flag,Argument<String> chargescur,Argument<I
totalcur = cur;
totalamt = Platform.numAdd(amt , mailamt);
String txt6 = NULLSTR;
/**
switch( rol )
{
case ownrol:
......@@ -119,12 +120,28 @@ static void printfoothzcopy3(boolean flag,Argument<String> chargescur,Argument<I
case opprol:
txt6 = "对方";
chargescur.value = cur;
chargesamt.value = totalamt;
chargesamt.value = totalamt.intValue();
break;
default:
txt6 = "";
chargescur.value = "";
chargesamt.value = 0;
}**/
if(rol.equals(ownrol)){
txt6 = "我方";
chargescur.value = "";
chargesamt.value = 0;
}else if(rol.equals(opprol)){
txt6 = "对方";
chargescur.value = cur;
chargesamt.value = totalamt.intValue();
}else{
txt6 = "";
chargescur.value = "";
chargesamt.value = 0;
}
String txt7 = NULLSTR;
if( Platform.compareTo( dsp , "X" ) == 0 )
......
......@@ -16,7 +16,7 @@ String swtPrtTagAmountNul(String argtag,String argcurr,int argamt)
}
if( ! Platform.isEmpty( argcurr ) )
{
fmtAmt = argcurr + $\trnmod.fmtAmountSwift( Platform.abs( argamt ), argcurr );
fmtAmt = argcurr + $\trnmod.fmtAmountSwift( Platform.abs( new BigDecimal(argamt) ), argcurr );
Platform.printTemp( swtPrtTagField( tag, fmtAmt ) );
}
}
......
......@@ -10,5 +10,5 @@ String getScore23X()
return "FACT/SCORE" + $doccur\smhinr.getValue() + ".zip";
}
}
return "";
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ String swtPrtTagContact(String argtag,String argmod,String argmt)
if( Platform.errorCode() > 0 )
{
Platform.reraise();
if(1==1) return;
if(1==1) return "";
}
}
// Content of Tag is Name + Phone number for some DTE messages. In all other cases just name.
......
......@@ -7,13 +7,13 @@ void xmlPrintFooter()
{
// Letter (footer for standard forms)
trx = #CT000876 + $\trnmod\trn\inr.getValue();
Platform.beginfooter ( tdPage );
//Platform.beginfooter ( tdPage );
Platform.printTempUsing( "trndoc.signat", "", trx + "/" + Platform.getLoginUser());
Platform.endfooter();
//Platform.endfooter();
// "Letter without signature" should only be situated at last page
Platform.beginfooter ( tdPageLast );
//Platform.beginfooter ( tdPageLast );
Platform.printTempUsing( "trndoc.signat", #CT000927, trx + "/" + Platform.getLoginUser());
Platform.endfooter();
//Platform.endfooter();
}
else
{
......
......@@ -16,5 +16,5 @@ String xmlFmtDate(String argdattyp,Date argdate)
case "N":
return Platform.format( argdate, docUil );
}
return "";
}
\ No newline at end of file
void printDocAmount(String argcur,int argamt)
{
Platform.printTempUsing( "trndoc.docamount", argcur, xmlFmtAmount( argamt, argcur ));
Platform.printTempUsing( "trndoc.docamount", argcur, xmlFmtAmount( new BigDecimal(argamt), argcur ));
}
\ No newline at end of file
......@@ -26,7 +26,6 @@ static String getProductName()
{
return #CT000022;
}
break;
case "CC":
return #CT000024;
case "CP":
......
......@@ -10,11 +10,31 @@ static void getStandardReference(Argument<String> ownref,String sector,String pn
// if reference number already filled - do nothing
if( ! Platform.isEmpty( ownref.value ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto done
return ; // #### goto done
}
if( Platform.isEmpty( pntref ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto GetNewRef
//return ; // #######TODO 改写 LABEL与GOTO #### goto GetNewRef
// #######TODO 改写 LABEL与GOTO #### label GetNewRef
// if number of parents contract empty
// - generate new reference
// Generate Name of counter to be taken
// Standard version: count per business sector and year
String couNam = sector + "D" + Platform.toString( Platform.getYear( Platform.today() ), -4 );
// get next counter number
// Standard version: counter length = fixed 5 with leading zeros
String couVal = Platform.toString( Platform.dbCounter( couNam ), -5 );
// get first byte of entity
String ety = Platform.trim( Platform.mid( $\sysmod\ety\extkey.getValue(), 1, 1 ) );
if( Platform.isEmpty( ety ) )
{
ety = "-";
}
// create reference number
// Standard version: sector + year + entity + counter
ownref.value = sector + Platform.mid( Platform.toString( Platform.getYear( Platform.today() ), -4 ), 3, 2 ) + ety + couVal;
// #### label done
return;
}
// if number of parents contract is filled
// - find first free sub number and use this
......@@ -95,7 +115,8 @@ static void getStandardReference(Argument<String> ownref,String sector,String pn
if(1==1) return;
}
}
return ; // #######TODO 改写 LABEL与GOTO #### goto done
//return ; // #######TODO 改写 LABEL与GOTO #### goto done
/**
// #######TODO 改写 LABEL与GOTO #### label GetNewRef
// if number of parents contract empty
// - generate new reference
......@@ -114,6 +135,6 @@ static void getStandardReference(Argument<String> ownref,String sector,String pn
// create reference number
// Standard version: sector + year + entity + counter
ownref.value = sector + Platform.mid( Platform.toString( Platform.getYear( Platform.today() ), -4 ), 3, 2 ) + ety + couVal;
// #######TODO 改写 LABEL与GOTO #### label done
// #### label done
**/
}
\ No newline at end of file
......@@ -18,7 +18,6 @@ String getLiaActtyp(String typ,String bussec)
default:
return "G1";
}
break;
default:
return "EN";
}
......
......@@ -26,7 +26,6 @@ boolean isSendSms()
if( ! Platform.isEmpty( smsinr ) )
{
return false;
break;
}
trnsql = "select cortrninr from trn where inr='" + cortrninr + "' ";
Platform.dbExecuteSql( trnsql );
......@@ -37,7 +36,6 @@ boolean isSendSms()
if( Platform.isEmpty( cortrninr ) )
{
return true;
break;
}
}
}
......
......@@ -18,7 +18,8 @@ String actGetBlk(String sqlblk,String actptyinr,int amt)
mySql = Platform.getLine( sqlStm, linIdx );
if( Platform.isEmpty( mySql ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto nextsql
//return ; // #### goto nextsql
continue;
}
if( amt < 0 )
{
......@@ -49,12 +50,13 @@ String actGetBlk(String sqlblk,String actptyinr,int amt)
}
}
}
return ; // #######TODO 改写 LABEL与GOTO #### goto nextsql
//return ; // #### goto nextsql
continue;
}
// if not in cache retrieve from DB
Platform.streamClear( accLst );
Platform.streamClear( streaminr );
Platform.dbFetchStreamWithINR( streaminr, $wrkact, mySql );
Platform.ddbFetchStreamWithINR( streaminr, $wrkact, mySql );
for(int i = 1;i <= Platform.streamCount( streaminr );i++)
{
inr = Platform.getLine( streaminr, i );
......@@ -81,7 +83,7 @@ String actGetBlk(String sqlblk,String actptyinr,int amt)
}
Platform.dbCloseCursor();
Platform.cacheWrite( accLst, "ACTGETBLK", mySql );
// #######TODO 改写 LABEL与GOTO #### label nextsql
// #### label nextsql
}
return res;
......
......@@ -12,7 +12,7 @@ static void engInbCbs(String cbt,String extid,Date dat,String cur,int amt,String
$\trnmod\wrkcbe\nam = nam;
$\trnmod\wrkcbe\acc = acc;
$\trnmod\wrkcbe\acc2 = acc2;
$\trnmod\wrkcbe\xrfamt = $\cbsmod\xrtmod.sysCurEqu( cur, amt, Platform.today() );
$\trnmod\wrkcbe\xrfamt = $\cbsmod\xrtmod.sysCurEqu( cur, new BigDecimal(amt), Platform.today() );
$\trnmod\wrkcbe\xrfcur = $\cbsmod\xrtmod.sysiso();
Platform.cbsStoreEntry( $\trnmod\wrkcbe, obj );
}
......
......@@ -12,7 +12,7 @@ static void engOutCbs(String cbt,String extid,Date dat,String cur,int amt,String
$\trnmod\wrkcbe\nam = nam;
$\trnmod\wrkcbe\acc = acc;
$\trnmod\wrkcbe\acc2 = acc2;
$\trnmod\wrkcbe\xrfamt = $\cbsmod\xrtmod.sysCurEqu( cur, amt, Platform.today() );
$\trnmod\wrkcbe\xrfamt = $\cbsmod\xrtmod.sysCurEqu( cur, new BigDecimal(amt), Platform.today() );
$\trnmod\wrkcbe\xrfcur = $\cbsmod\xrtmod.sysiso();
Platform.cbsStoreEntry( $\trnmod\wrkcbe, obj );
}
......
......@@ -46,7 +46,7 @@ void troLockAdditionalContract(IModule obj)
{
lckTxt = Platform.getErrorText();
errorCode = Platform.errorCode();
$mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, Platform.getText( #CT000028, Platform.errorCode(), Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime( GetLockTime ), 1, 5 ), ownRef ), "ADDLCKWRN" + Platform.recGetObj( obj ) + Platform.recGetInr( obj ) );
$mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, Platform.getText( #CT000028, Platform.errorCode(), Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime( (int)GetLockTime ), 1, 5 ), ownRef ), "ADDLCKWRN" + Platform.recGetObj( obj ) + Platform.recGetInr( obj ) );
Platform.setErrorCode( errorCode, lckTxt );
return ; // #######TODO 改写 LABEL与GOTO #### goto done
}
......
......@@ -50,42 +50,42 @@ void savPtsptaForContract(IModule arggrp,String arginr)
ptsinr = "";
}
// set PTSPTA to current PTSPTA
// SetModuleContent( PTSMOD\PTSPTA, $PtsPtaMod )
// SetModuleContent( PTSMOD\PTSPTA, $ptsPtaMod )
// if not isempty, store PTS
if( ptsPtaMod.IsRolSet )
if( ptsPtaMod.isRolSet() )
{
// set key fields.
$$ptsptamod\pts\ptyinr = $$ptsptamod\pta\ptyinr;
$$ptsptamod\pts\ptainr = $$ptsptamod\pta\inr;
$$ptsptamod\pts\rol = rol;
$$ptsPtaMod\pts\ptyinr = $$ptsPtaMod\pta\ptyinr;
$$ptsPtaMod\pts\ptainr = $$ptsPtaMod\pta\inr;
$$ptsPtaMod\pts\rol = rol;
ownref = Platform.getContent( Platform.recGetPath( arggrp ) + "\\OWNREF" );
if( Platform.errorCode() > 0 )
{
ownref = "<NONREF>";
}
$$ptsptamod\pts\objtyp = objTyp;
$$ptsptamod\pts\objinr = objInr;
$$ptsptamod\pts\ownref = ownref + "\\" + rol;
$$ptsPtaMod\pts\objtyp = objTyp;
$$ptsPtaMod\pts\objinr = objInr;
$$ptsPtaMod\pts\ownref = ownref + "\\" + rol;
// insert or update row depending on availability
if( Platform.isEmpty( ptsinr ) )
{
Platform.sdbInsert( $$ptsptamod\pts );
Platform.sdbInsert( $$ptsPtaMod\pts );
}
else
{
$$ptsptamod\pts\inr = ptsinr;
Platform.sdbUpdate( $$ptsptamod\pts );
$$ptsPtaMod\pts\inr = ptsinr;
Platform.sdbUpdate( $$ptsPtaMod\pts );
}
// set PTS in contract group
// SetModuleContent( $ptsptamod\PTS, PTSMOD\PTSPTA\PTS )
// SetModuleContent( $ptsPtaMod\PTS, PTSMOD\PTSPTA\PTS )
}
else
{
// if role is stored, remove it
if( ! Platform.isEmpty( ptsinr ) )
{
$$ptsptamod\pts\inr = ptsinr;
Platform.sdbDelete( $$ptsptamod\pts );
$$ptsPtaMod\pts\inr = ptsinr;
Platform.sdbDelete( $$ptsPtaMod\pts );
}
}
}
......
......@@ -21,6 +21,7 @@ void trnmodCancel(String argstoptext,String argcantyp)
if( Platform.compareTo($\sysmod\ssn\bckgrd, "B" )== 0 )
{
dummy = $\sysmod.evtWrite( $trn\objtyp.getValue(), $trn\objinr.getValue(), "E", argstoptext );
String NtfTypWarning = "";
$\sysmod\ntfmod.ntfSendToUsr( Platform.getLoginUser(), NtfTypWarning, argstoptext );
// to issue the logic synchronously to handle the break function
$\sysmod.lnkHandleInterruptTransaction();
......
......@@ -174,9 +174,9 @@ void trnModCopyContract(IModule argobj)
Platform.getModuleInfoStream( fldstm, ptsmod, tdModuleDatafields );
internalCopyFields( ptsmod, fldstm, fldModstm );
// set in xxxGRP-module PTA and ADR from (possible changed) PTS
if( $$ptspta\pts\ptainr != $$ptspta\pta\inr )
if( $$ptsPta\pts\ptainr != $$ptsPta\pta\inr )
{
$ptsmod.ptsmodGetPtsptaFromPts( ptsPta, $$ptspta\pts );
$ptsmod.ptsmodGetPtsptaFromPts( ptsPta, $$ptsPta\pts );
}
// reset modified flag for PTS\ADRBLK to ensure redefaulting of address block on changes.
ptsFld = Platform.getField( Platform.recGetPath( ptsPta ) + "\\PTS\\ADRBLK" );
......
......@@ -32,7 +32,7 @@ void internalCopyFields(IModule argmod,IStream argfldstm,IStream argmodfldstm)
{
if( Platform.errorCode() == -93 )
{
contentnumeric = Platform.loadContentNumeric();
contentnumeric = (int)Platform.loadContentNumeric();
if( Platform.isEmpty( contentnumeric ) )
{
content = "";
......
......@@ -71,7 +71,7 @@ void checkPendingSPTs(IModule obj)
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{
que = Platform.prompt( "$1", txt );
if( que == tdPromptYes )
if( que )
{
$mtabut.saverecgrp();
troFree();
......@@ -108,7 +108,7 @@ void checkPendingSPTs(IModule obj)
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{
sptQue = Platform.prompt( "$1", sptTxt );
if( sptQue == tdPromptCancel )
if( sptQue )
{
$mtabut.saverecgrp();
troFree();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment