Commit 999310e1 by 潘际乾

N-S脚本文件修改

parent 1beba488
void ntfCheck() void ntfCheck() {
{
//! Subroutine to check for the existance of new notify entries //! Subroutine to check for the existance of new notify entries
int errFlg = 0; // Errorflag int errFlg = 0; // Errorflag
String clsFlg = ""; // Shutdown flag String clsFlg = ""; // Shutdown flag
String ntfInr = ""; // INR String ntfInr = ""; // INR
String ntfMsg = ""; // Msgtext for ShowNotifyMessage String ntfMsg = ""; // Msgtext for ShowNotifyMessage
int ntfFlg = 0; // Flag holding the type for ShowNotifyMessage int ntfFlg = 0; // Flag holding the type for ShowNotifyMessage
int ntfCnt = 0; // Counter of currently processed message int ntfCnt = 0; // Counter of currently processed message
int ntfDelay = 60; // Delay for post of this routine int ntfDelay = 60; // Delay for post of this routine
//# NTF.INR //# NTF.INR
String sql = "SELECT INR FROM NTF"; String sql = "SELECT INR FROM NTF";
String con = " WHERE"; String con = " WHERE";
...@@ -16,60 +15,52 @@ void ntfCheck() ...@@ -16,60 +15,52 @@ void ntfCheck()
con = " AND"; con = " AND";
sql = sql + " ORDER BY INR"; sql = sql + " ORDER BY INR";
Platform.dbExecuteSQL( sql, $\sysmod\ssn\inr.getValue(), $\sysmod\usr\extkey.getValue() ); Platform.dbExecuteSQL( sql, $\sysmod\ssn\inr.getValue(), $\sysmod\usr\extkey.getValue() );
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 ) {
{
errFlg = Platform.errorCode(); errFlg = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone return ; // #######TODO #### goto AllDone
} }
IStream ntfStr = new StreamImpl(); IStream ntfStr = new StreamImpl();
Platform.dbFetchStream( ntfStr ); Platform.dbFetchStream( ntfStr );
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 ) {
{
errFlg = Platform.errorCode(); errFlg = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone return ; // #######TODO #### goto AllDone
} }
Platform.dbCloseCursor(); Platform.dbCloseCursor();
// #######TODO 改写 LABEL与GOTO #### label ExecLoop // #######TODO #### label ExecLoop
ExecLoop:
while(true){
ntfCnt = ntfCnt + 1; ntfCnt = ntfCnt + 1;
if( ntfCnt > Platform.streamCount( ntfStr ) ) if( ntfCnt > Platform.streamCount( ntfStr ) ) {
{ break ; // #######TODO #### goto AllDone
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone
} }
ntfInr = Platform.getLine( ntfStr, ntfCnt ); ntfInr = Platform.getLine( ntfStr, ntfCnt );
Platform.sdbReadHold( $ntf, ntfInr ); Platform.sdbReadHold( $ntf, ntfInr );
if( Platform.errorCode() == tdOdbcNotFound || Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld || ! Platform.isEmpty( $ntf\shwssninr ) ) if( Platform.errorCode() == tdOdbcNotFound || Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld || ! Platform.isEmpty( $ntf\shwssninr ) ) {
{ continue ExecLoop; // #######TODO #### goto ExecLoop
return ; // #######TODO 改写 LABEL与GOTO #### goto ExecLoop } else {
} if( Platform.errorCode() > 0 ) {
else
{
if( Platform.errorCode() > 0 )
{
errFlg = Platform.errorCode(); errFlg = Platform.errorCode();
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone break ; // #######TODO #### goto AllDone
} }
} }
Platform.reraise(); Platform.reraise();
if( ! Platform.isEmpty( $ntf\expdattim ) ) boolean expRec = false;
{ if( ! Platform.isEmpty( $ntf\expdattim ) ) {
if( Platform.diff($ntf\expdattim.getValue() , Platform.toDay())<0 ) if( Platform.diff($ntf\expdattim.getValue() , Platform.toDay())<0 ) {
{ expRec = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto ExpRec //return ; // #######TODO #### goto ExpRec
} }
} }
if(!expRec){
// PRCFLG = NTF\TYP // PRCFLG = NTF\TYP
switch( $ntf\typ.getValue() ) switch( $ntf\typ.getValue() ) {
{
case "C": case "C":
// Check whether already in initial transaction // Check whether already in initial transaction
if( Platform.compareTo( Platform.getTransName() , Platform.getInitialTransaction() ) == 0 ) if( Platform.compareTo( Platform.getTransName() , Platform.getInitialTransaction() ) == 0 ) {
{
ntfFlg = 4; ntfFlg = 4;
// Flag the entry as notified (as nothing has to be processed) // Flag the entry as notified (as nothing has to be processed)
$ntf\shwflg = "N"; $ntf\shwflg = "N";
} } else {
else
{
ntfFlg = 4; ntfFlg = 4;
// Set a flag of shutdown routine typ // Set a flag of shutdown routine typ
clsFlg = $ntf\typ; clsFlg = $ntf\typ;
...@@ -99,8 +90,7 @@ void ntfCheck() ...@@ -99,8 +90,7 @@ void ntfCheck()
$ntf\shwflg = "N"; $ntf\shwflg = "N";
} }
// Administration messages are only shown if a text is included // Administration messages are only shown if a text is included
if( Platform.compareTo( $ntf\shwflg , "N" ) == 0 || ! Platform.isEmpty( $ntf\txt ) ) if( Platform.compareTo( $ntf\shwflg , "N" ) == 0 || ! Platform.isEmpty( $ntf\txt ) ) {
{
// Create the Notifytext holding the Date/Time and the text of the notify message // Create the Notifytext holding the Date/Time and the text of the notify message
ntfMsg = getNotifyText( $ntf ); ntfMsg = getNotifyText( $ntf );
// Create the Notifyflag depending on the notify entry // Create the Notifyflag depending on the notify entry
...@@ -110,59 +100,59 @@ void ntfCheck() ...@@ -110,59 +100,59 @@ void ntfCheck()
ntfFlg = ntfFlgBox.value; ntfFlg = ntfFlgBox.value;
Platform.showNotifyMessage( ntfFlg, ntfMsg ); Platform.showNotifyMessage( ntfFlg, ntfMsg );
if( Platform.errorCode() == 145 ) if( Platform.errorCode() == 145 ) {
{
Platform.pause( 1 ); Platform.pause( 1 );
Platform.showNotifyMessage( ntfFlg, ntfMsg ); Platform.showNotifyMessage( ntfFlg, ntfMsg );
} }
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 ) {
{
errFlg = Platform.errorCode(); errFlg = Platform.errorCode();
Platform.dbFree( $ntf ); Platform.dbFree( $ntf );
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone break ExecLoop; // #######TODO #### goto AllDone
} }
} }
// #######TODO 改写 LABEL与GOTO #### label UpdateNtf }
// #######TODO #### label UpdateNtf
UpdateNtf:
while(true){
if(!expRec){
$ntf\shwdattim = Platform.toDay(); $ntf\shwdattim = Platform.toDay();
$ntf\shwssninr = $\sysmod\ssn\inr; $ntf\shwssninr = $\sysmod\ssn\inr;
Platform.sdbUpdate( $ntf ); Platform.sdbUpdate( $ntf );
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 ) {
{
errFlg = Platform.errorCode(); errFlg = Platform.errorCode();
Platform.dbFree( $ntf ); Platform.dbFree( $ntf );
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone break ExecLoop; // #######TODO #### goto AllDone
} }
// Maximum number auf Notifymsg in one session to stop too many // Maximum number auf Notifymsg in one session to stop too many
// successive notify messages // successive notify messages
if( ntfCnt < 10 ) if( ntfCnt < 10 ) {
{ continue ExecLoop ; // #######TODO #### goto ExecLoop
return ; // #######TODO 改写 LABEL与GOTO #### goto ExecLoop
} }
ntfDelay = 10; // Set reduced delay for post of this routine ntfDelay = 10; // Set reduced delay for post of this routine
return ; // #######TODO 改写 LABEL与GOTO #### goto AllDone break ExecLoop;// return ; // #######TODO #### goto AllDone
// #######TODO 改写 LABEL与GOTO #### label ExpRec }
// #######TODO #### label ExpRec
// Flag the entry as expired // Flag the entry as expired
expRec=false;
$ntf\shwflg = "X"; $ntf\shwflg = "X";
return ; // #######TODO 改写 LABEL与GOTO #### goto UpdateNtf // return ; // #######TODO #### goto UpdateNtf
// #######TODO 改写 LABEL与GOTO #### label AllDone // #######TODO #### label AllDone
}
//break;
}
Platform.dbCommit(); Platform.dbCommit();
// On errors during ShowNotifyMessage prompt with message // On errors during ShowNotifyMessage prompt with message
int can = 0; int can = 0;
if( errFlg > 0 ) if( errFlg > 0 ) {
{ if( errFlg == 145 ) {
if( errFlg == 145 ) can = Platform.prompt( #CT000005, ntfMsg ) ? 1 : 0;
{ } else {
can = Platform.prompt( #CT000005, ntfMsg ); can = Platform.prompt( #CT000006, ntfMsg, errFlg ) ? 1 : 0;
}
else
{
can = Platform.prompt( #CT000006, ntfMsg, errFlg );
} }
ntfDelay = 60; // Reset the delay ntfDelay = 60; // Reset the delay
} }
// Execute one of the functions to be processed // Execute one of the functions to be processed
if( ! Platform.isEmpty( clsFlg ) ) if( ! Platform.isEmpty( clsFlg ) ) {
{
// at first rollback and free all locked resources // at first rollback and free all locked resources
Platform.dbRollback(); Platform.dbRollback();
Platform.dbFreeAll(); Platform.dbFreeAll();
...@@ -171,13 +161,10 @@ void ntfCheck() ...@@ -171,13 +161,10 @@ void ntfCheck()
// and finally return to first or exit // and finally return to first or exit
// X -> "LnkExit" // X -> "LnkExit"
// C -> "LnkReturntoFirst" // C -> "LnkReturntoFirst"
if( Platform.compareTo( clsFlg , "C" ) == 0 ) if( Platform.compareTo( clsFlg , "C" ) == 0 ) {
{
// usage of synch post to avoid the export of the out-variables of LnkReturnToFirst // usage of synch post to avoid the export of the out-variables of LnkReturnToFirst
Platform.invokeModulePath( "LnkReturnToFirst", -1 ); Platform.invokeModulePath( "LnkReturnToFirst", -1 );
} } else {
else
{
// mark session as canceled when finally exiting // mark session as canceled when finally exiting
$\sysmod\ssn\sta.setValue ( "C" ); $\sysmod\ssn\sta.setValue ( "C" );
// usage of synch post to avoid the export of the out-variables of LnkExit // usage of synch post to avoid the export of the out-variables of LnkExit
...@@ -185,8 +172,7 @@ void ntfCheck() ...@@ -185,8 +172,7 @@ void ntfCheck()
} }
} }
// Post the next check cycle if not canceled // Post the next check cycle if not canceled
if( can != 1 ) if( can != 1 ) {
{
//# NtfCheck //# NtfCheck
Platform.invokeModulePath( "NtfCheck", ntfDelay ); Platform.invokeModulePath( "NtfCheck", ntfDelay );
} }
......
...@@ -8,13 +8,15 @@ init $$\ order 9001550 ...@@ -8,13 +8,15 @@ init $$\ order 9001550
int cnt = 0; int cnt = 0;
int lowCnt = 0; int lowCnt = 0;
int higCnt = 0; int higCnt = 0;
boolean can = false; int can = 0;
String res = NULLSTR; String res = NULLSTR;
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 && Platform.compareTo( iniFrm , Platform.getTransName() ) == 0 ) if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 && Platform.compareTo( iniFrm , Platform.getTransName() ) == 0 )
{ {
cnt = 0; cnt = 0;
Platform.dbExecuteSQL( "select count(*) from NTF where USR = ? AND SHWSSNINR = ' ' and (EXPDATTIM > ? or EXPDATTIM is null)", $\sysmod\usr\extkey.getValue(), Platform.toDay() ); Platform.dbExecuteSQL( "select count(*) from NTF where USR = ? AND SHWSSNINR = ' ' and (EXPDATTIM > ? or EXPDATTIM is null)", $\sysmod\usr\extkey.getValue(), Platform.toDay() );
Argument<Integer> cntBox = new Argument<Integer>("",cnt);
Platform.dbFetchFields( "", cnt ); Platform.dbFetchFields( "", cnt );
cnt = cntBox.value;
Platform.dbCloseCursor(); Platform.dbCloseCursor();
lowCnt = 10; lowCnt = 10;
higCnt = 100; higCnt = 100;
...@@ -23,7 +25,7 @@ init $$\ order 9001550 ...@@ -23,7 +25,7 @@ init $$\ order 9001550
if( cnt > higCnt ) if( cnt > higCnt )
{ {
// deactivate notify system // deactivate notify system
can = Platform.prompt( #CT000011, higCnt ); can = Platform.prompt( #CT000011, higCnt ) ? 1 : 0;
if( can == tdPromptOK ) if( can == tdPromptOK )
{ {
Platform.lnkCallTransaction( "DBRNTF" ); Platform.lnkCallTransaction( "DBRNTF" );
...@@ -36,13 +38,13 @@ init $$\ order 9001550 ...@@ -36,13 +38,13 @@ init $$\ order 9001550
} }
else else
{ {
can = Platform.promptYesNo( #CT000009, lowCnt ); can = Platform.promptYesNo( #CT000009, String.valueOf(lowCnt) );
switch( can ) switch( can )
{ {
case tdPromptYes: case 1:
Platform.lnkCallTransaction( "DBRNTF" ); Platform.lnkCallTransaction( "DBRNTF" );
break; break;
case tdPromptNo: case 0:
res = "TRUE"; res = "TRUE";
Platform.cacheWrite( res, "NTFMOD", "NTFSTOP", $\sysmod\usr\extkey.getValue() ); Platform.cacheWrite( res, "NTFMOD", "NTFSTOP", $\sysmod\usr\extkey.getValue() );
break; break;
......
void chgPwd() void chgPwd()
{ {
Platform.GetUser( Platform.getLoginUser(), nam, prf, uil, status, admin, designer ); String nam, prf, uil, sta, admin, designer;
Argument<String> namBox = new Argument<>();
Argument<String> prfBox = new Argument<>();
Argument<String> uilBox = new Argument<>();
Argument<String> staBox = new Argument<>();
Argument<String> adminBox = new Argument<>();
Argument<String> designerBox = new Argument<>();
Platform.GetUser( Platform.getLoginUser(), namBox, prfBox, uilBox, staBox, adminBox, designerBox );
nam = namBox.value;
$user = nam; $user = nam;
Platform.clear( $oldpwd ); Platform.clear( $oldpwd );
Platform.clear( $newpwd ); Platform.clear( $newpwd );
......
...@@ -12,8 +12,15 @@ event $butchg order 1000 ...@@ -12,8 +12,15 @@ event $butchg order 1000
} }
else else
{ {
Platform.GetUser( $\sysmod\usr\extkey.getValue(), nam, prf, uil, sta, admin, designer ); String nam, prf, uil, sta, admin, designer;
Platform.SetUser( $\sysmod\usr\extkey.getValue(), nam, prf, uil, 4, admin, designer, $newpwd.getValue(), $oldpwd.getValue() ); Argument<String> namBox = new Argument<>();
Argument<String> prfBox = new Argument<>();
Argument<String> uilBox = new Argument<>();
Argument<String> staBox = new Argument<>();
Argument<String> adminBox = new Argument<>();
Argument<String> designerBox = new Argument<>();
Platform.GetUser( $\sysmod\usr\extkey.getValue(), namBox, prfBox, uilBox, staBox, adminBox, designerBox );
// Platform.SetUser( $\sysmod\usr\extkey.getValue(), nam, prf, uil, 4, admin, designer, $newpwd.getValue(), $oldpwd.getValue() );
// evaluate return code // evaluate return code
switch( Platform.errorCode() ) switch( Platform.errorCode() )
{ {
......
String getFileBlock(String argpath,String argpattern) String getFileBlock(String argpath,String argpattern)
{ {
String val = ""; String val = "";
IStream str = new StreamImpl();
Platform.getDirStream( str, argpath, argpattern, 0 ); Platform.getDirStream( str, argpath, argpattern, 0 );
int stmCnt = 0; int stmCnt = 0;
String fil = NULLSTR; String fil = NULLSTR;
......
...@@ -10,7 +10,7 @@ event $frm order 1000 ...@@ -10,7 +10,7 @@ event $frm order 1000
Platform.dbExecuteSQL( "SELECT DTAFLG FROM ATP WHERE COD= ?", Platform.toUpper( $frm.getValue() ) ); Platform.dbExecuteSQL( "SELECT DTAFLG FROM ATP WHERE COD= ?", Platform.toUpper( $frm.getValue() ) );
if( Platform.errorCode() > 0 ) if( Platform.errorCode() > 0 )
{ {
if( Platform.prompt( #CT000022, Platform.errorCode(), Platform.getErrorText(), $frm.getValue() ) == tdPromptYes ) if( Platform.prompt( #CT000022, Platform.errorCode(), Platform.getErrorText(), $frm.getValue() ) == Platform.intConvertBoolean(tdPromptYes) )
{ {
Platform.lnkCallTransaction( $frm.getValue() ); Platform.lnkCallTransaction( $frm.getValue() );
} }
......
...@@ -47,12 +47,12 @@ void checkusrspt() ...@@ -47,12 +47,12 @@ void checkusrspt()
} }
boolean que = Platform.prompt( #CT000024, $\sysmod\spt\dattim.getValue() ); boolean que = Platform.prompt( #CT000024, $\sysmod\spt\dattim.getValue() );
String sptEty = NULLSTR; String sptEty = NULLSTR;
if( que == tdPromptYes ) if( que == Platform.intConvertBoolean(tdPromptYes) )
{ {
Platform.dbLock( $\sysmod\spt ); Platform.dbLock( $\sysmod\spt );
if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld ) if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld )
{ {
Platform.message( #CT000025, $\sysmod\spt\objnam.getValue(), GetLockUID, Platform.fmtTime( GetLockTime ) ); Platform.message( #CT000025, $\sysmod\spt\objnam.getValue(), GetLockUID, Platform.fmtTime((int) GetLockTime ) );
} }
else else
{ {
......
...@@ -37,8 +37,8 @@ void codSaveTxt() ...@@ -37,8 +37,8 @@ void codSaveTxt()
if( Platform.isEmpty( txt ) ) if( Platform.isEmpty( txt ) )
{ {
// an empty text is not stored thus the existing entry is deleted // an empty text is not stored thus the existing entry is deleted
/**/ /**
/ genal为空不再删除数据 genal为空不再删除数据
SdbDeleteWithLog( OIT ) SdbDeleteWithLog( OIT )
**/ **/
if( Platform.compareTo( Platform.getTransName() , "DBEPTY" ) == 0 ) if( Platform.compareTo( Platform.getTransName() , "DBEPTY" ) == 0 )
......
...@@ -10,14 +10,14 @@ void calcDur(Date olddattim) ...@@ -10,14 +10,14 @@ void calcDur(Date olddattim)
Long datediff = Platform.dateTimeDiff( $ore\enddattim.getValue(), $ore\begdattim.getValue() ); Long datediff = Platform.dateTimeDiff( $ore\enddattim.getValue(), $ore\begdattim.getValue() );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
$ore\prcdur = new BigDecimal(convertTimeToSeconds( datediff )); $ore\prcdur = new BigDecimal(convertTimeToSeconds( datediff.intValue() ));
} }
else else
{ {
Platform.sysDumpInfo( Platform.formatText( "Inconsistent DATTIM values in ORE record. ORD\\INR='$1'", $ore\ordinr.getValue() ) ); Platform.sysDumpInfo( Platform.formatText( "Inconsistent DATTIM values in ORE record. ORD\\INR='$1'", $ore\ordinr.getValue() ) );
$ore\prcdur = new BigDecimal("0"); $ore\prcdur = new BigDecimal("0");
} }
if( Platform.compareTo($ore\prcdur.getValue() , 9999999999)>0 ) if( Platform.compareTo($ore\prcdur.getValue() , 9999999999L)>0 )
{ {
$ore\prcdur = new BigDecimal("9999999999"); $ore\prcdur = new BigDecimal("9999999999");
} }
...@@ -30,14 +30,14 @@ void calcDur(Date olddattim) ...@@ -30,14 +30,14 @@ void calcDur(Date olddattim)
datediff = Platform.dateTimeDiff( $ore\begdattim.getValue(), olddattim ); datediff = Platform.dateTimeDiff( $ore\begdattim.getValue(), olddattim );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
{ {
$ore\waidur = new BigDecimal(convertTimeToSeconds( datediff )); $ore\waidur = new BigDecimal(convertTimeToSeconds( datediff.intValue() ));
} }
else else
{ {
Platform.sysDumpInfo( Platform.formatText( "Inconsistent BEGDATTIM value in ORE record. ORD\\INR='$1'", $ore\ordinr.getValue() ) ); Platform.sysDumpInfo( Platform.formatText( "Inconsistent BEGDATTIM value in ORE record. ORD\\INR='$1'", $ore\ordinr.getValue() ) );
$ore\waidur = new BigDecimal("0"); $ore\waidur = new BigDecimal("0");
} }
if( Platform.compareTo($ore\waidur.getValue() , 9999999999)>0 ) if( Platform.compareTo($ore\waidur.getValue() , 9999999999L)>0 )
{ {
$ore\waidur = new BigDecimal("9999999999"); $ore\waidur = new BigDecimal("9999999999");
} }
......
...@@ -53,7 +53,8 @@ void readPRTGRD(String argobjtyp,String argobjinr) ...@@ -53,7 +53,8 @@ void readPRTGRD(String argobjtyp,String argobjinr)
for(int tefIdx = 1;tefIdx <= stmCnt;tefIdx++) for(int tefIdx = 1;tefIdx <= stmCnt;tefIdx++)
{ {
found = false; found = false;
for(int grdIdx = 1;grdIdx <= gridcnt;grdIdx++) int grdIdx = 1;
for(;grdIdx <= gridcnt;grdIdx++)
{ {
if( Platform.compareTo( Platform.getLine( tefKeys, tefIdx ) , $prtgrd[grdIdx]\tef ) == 0 ) if( Platform.compareTo( Platform.getLine( tefKeys, tefIdx ) , $prtgrd[grdIdx]\tef ) == 0 )
{ {
......
...@@ -54,7 +54,7 @@ event onPanelShow $prttst order 100 ...@@ -54,7 +54,7 @@ event onPanelShow $prttst order 100
Platform.printTempUsing( "prtmod.prttstlin", #LI000007, Platform.getLoginUser()); Platform.printTempUsing( "prtmod.prttstlin", #LI000007, Platform.getLoginUser());
Platform.printTempUsing( "prtmod.prttstlin", #LI000008, Platform.today()); Platform.printTempUsing( "prtmod.prttstlin", #LI000008, Platform.today());
Platform.printTempUsing( "prtmod.prttstlin", #LI000009, Platform.fmtTime( Platform.Time() )); Platform.printTempUsing( "prtmod.prttstlin", #LI000009, Platform.fmtTime( Platform.Time() ));
Platform.printTempUsing( "prtmod.prttstlin", #LI000056, Platform.getPanelInfo( $prttst, 4 )); Platform.printTempUsing( "prtmod.prttstlin", #LI000056, Platform.getPanelInfo( $prttst, String.valueOf(4) ));
if( Platform.isEmpty( $prt\bin ) ) if( Platform.isEmpty( $prt\bin ) )
{ {
Platform.printTempUsing( "prtmod.prttstlin", #LI000011); Platform.printTempUsing( "prtmod.prttstlin", #LI000011);
...@@ -69,12 +69,12 @@ event onPanelShow $prttst order 100 ...@@ -69,12 +69,12 @@ event onPanelShow $prttst order 100
{ {
Platform.printTempUsing( "prtmod.prttstlin", #LI000012, $prt\bin.getValue()); Platform.printTempUsing( "prtmod.prttstlin", #LI000012, $prt\bin.getValue());
Platform.printTempUsing( "prtmod.prttstlin", #LI000021, $prt\bin2.getValue()); Platform.printTempUsing( "prtmod.prttstlin", #LI000021, $prt\bin2.getValue());
Platform.printTempUsing( "prtmod.prttstlin2", Platform.getPanelInfo( $prttst, 4 )); Platform.printTempUsing( "prtmod.prttstlin2", Platform.getPanelInfo( $prttst, String.valueOf(4) ));
} }
} }
if( Platform.compareTo($tstflg, "2" )== 0 ) if( Platform.compareTo($tstflg, "2" )== 0 )
{ {
Platform.printTemp( pagebreak); // Platform.printTemp( pagebreak);
Platform.printTempUsing( "prtmod.prttstlin", #LI000032); Platform.printTempUsing( "prtmod.prttstlin", #LI000032);
Platform.printTempUsing( "prtmod.prttstlin"); Platform.printTempUsing( "prtmod.prttstlin");
Platform.printTempUsing( "prtmod.prttstlin", #LI000036, $prt\prt.getValue()); Platform.printTempUsing( "prtmod.prttstlin", #LI000036, $prt\prt.getValue());
......
...@@ -12,12 +12,12 @@ default $rol order 1000 ...@@ -12,12 +12,12 @@ default $rol order 1000
if( Platform.compareTo($ptspta\rolchgflg, "P" )== 0) if( Platform.compareTo($ptspta\rolchgflg, "P" )== 0)
{ {
, Platform.compareTo($ptspta\rolchgflg, "C" )== 0 // Platform.compareTo($ptspta\rolchgflg, "C" )== 0
Platform.disable( $rol ); Platform.disable( $rol );
} }
else if( Platform.compareTo($ptspta\rolchgflg, "PO" )== 0) else if( Platform.compareTo($ptspta\rolchgflg, "PO" )== 0)
{ {
, Platform.compareTo($ptspta\rolchgflg, "" )== 0 // Platform.compareTo($ptspta\rolchgflg, "" )== 0
if( Platform.isEmpty( $ptspta\oldflg ) ) if( Platform.isEmpty( $ptspta\oldflg ) )
{ {
Platform.enable( $rol ); Platform.enable( $rol );
......
check $rol order 1000 check $rol order 1000
{ {
$\liaall.checkrole( $rol.getValue() ); // $\liaall.checkrole( $rol.getValue() );
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ boolean checkPTYTYP() ...@@ -5,7 +5,7 @@ boolean checkPTYTYP()
//modified by zt //modified by zt
//此系统不要此check //此系统不要此check
//因为临时地址问题 //因为临时地址问题
return true; // return true;
boolean res = true; boolean res = true;
$\trnmod\ptsmod\ptssub.ptsmodGetPtyOfPtspta( $ptspta, $\trnmod\ptsmod\pty ); $\trnmod\ptsmod\ptssub.ptsmodGetPtyOfPtspta( $ptspta, $\trnmod\ptsmod\pty );
String typsql = NULLSTR; String typsql = NULLSTR;
......
...@@ -16,7 +16,7 @@ event $adrp0 order 1000 ...@@ -16,7 +16,7 @@ event $adrp0 order 1000
switch( pmt ) switch( pmt )
{ {
// if yes or no post Events for assigned buttons // if yes or no post Events for assigned buttons
case tdPromptYes: case 1:
if( ! Platform.isEmpty( $tmpptsptapath ) ) if( ! Platform.isEmpty( $tmpptsptapath ) )
{ {
Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsTmpadrPopupTitledFrame", 0 ); Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsTmpadrPopupTitledFrame", 0 );
...@@ -24,11 +24,11 @@ event $adrp0 order 1000 ...@@ -24,11 +24,11 @@ event $adrp0 order 1000
} }
Platform.postEventRule( $savadr ); Platform.postEventRule( $savadr );
break; break;
case tdPromptNo: case 0:
Platform.postEventRule( $canadr ); Platform.postEventRule( $canadr );
// if cancel, reactivate the popup // if cancel, reactivate the popup
break; break;
case tdPromptCancel: case 2:
if( ! Platform.isEmpty( $tmpptsptapath ) ) if( ! Platform.isEmpty( $tmpptsptapath ) )
{ {
Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsTmpadrPopupTitledFrame", 0 ); Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsTmpadrPopupTitledFrame", 0 );
......
...@@ -7,7 +7,7 @@ event $canadr order 1000 ...@@ -7,7 +7,7 @@ event $canadr order 1000
{ {
if( Platform.isModified( $tmpadr ) ) if( Platform.isModified( $tmpadr ) )
{ {
if( Platform.prompt( #CT000077 ) == tdPromptCancel ) if( Platform.prompt( #CT000077 ) == Platform.intConvertBoolean(tdPromptCancel) )
{ {
can = false; can = false;
} }
...@@ -15,7 +15,7 @@ event $canadr order 1000 ...@@ -15,7 +15,7 @@ event $canadr order 1000
} }
else else
{ {
if( Platform.prompt( #CT000078 ) == tdPromptCancel ) if( Platform.prompt( #CT000078 ) == Platform.intConvertBoolean(tdPromptCancel) )
{ {
can = false; can = false;
} }
......
...@@ -5,7 +5,7 @@ void ptsOitAdrPopupForModify(#ptspta argptspta) ...@@ -5,7 +5,7 @@ void ptsOitAdrPopupForModify(#ptspta argptspta)
Platform.sdbReadLock( $wrkpty, $$argptspta\pta\ptyinr.getValue() ); Platform.sdbReadLock( $wrkpty, $$argptspta\pta\ptyinr.getValue() );
if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld ) if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld )
{ {
Platform.errorMessage( #CT000107, Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime( GetLockTime ), 1, 5 ) ); Platform.errorMessage( #CT000107, Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime((int) GetLockTime ), 1, 5 ) );
if(1==1) return; if(1==1) return;
} }
else else
......
...@@ -9,14 +9,14 @@ event $oitp order 1000 ...@@ -9,14 +9,14 @@ event $oitp order 1000
switch( pmt ) switch( pmt )
{ {
// if yes or no post Events for assigned buttons // if yes or no post Events for assigned buttons
case tdPromptYes: case 1:
Platform.postEventRule( $\trnmod\mtabut\coninf.savOit() ); Platform.postEventRule( $\trnmod\mtabut\coninf.savOit() );
break; break;
case tdPromptNo: case 0:
Platform.postEventRule( $canoit ); Platform.postEventRule( $canoit );
// if cancel, reactivate the popup // if cancel, reactivate the popup
break; break;
case tdPromptCancel: case 2:
if( ! Platform.isEmpty( $tmpptsptapath ) ) if( ! Platform.isEmpty( $tmpptsptapath ) )
{ {
Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsOitAdrPopupTitledFrame", 0 ); Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + ".PtsOitAdrPopupTitledFrame", 0 );
......
...@@ -4,7 +4,7 @@ event $canoit order 1000 ...@@ -4,7 +4,7 @@ event $canoit order 1000
// If cancel causes data loss, ask user. // If cancel causes data loss, ask user.
if( Platform.isModified( $ptssub\oited2\oitgrd ) ) if( Platform.isModified( $ptssub\oited2\oitgrd ) )
{ {
if( Platform.prompt( #CT000101 ) == tdPromptCancel ) if( Platform.prompt( #CT000101 ) == Platform.intConvertBoolean(tdPromptCancel) )
{ {
can = false; can = false;
} }
......
...@@ -9,14 +9,14 @@ event $detp order 1000 ...@@ -9,14 +9,14 @@ event $detp order 1000
switch( pmt ) switch( pmt )
{ {
// if yes or no post Events for assigned buttons // if yes or no post Events for assigned buttons
case tdPromptYes: case 1:
Platform.postEventRule( $mtdbut\butapy ); Platform.postEventRule( $mtdbut\butapy );
break; break;
case tdPromptNo: case 0:
Platform.postEventRule( $mtdbut\butcan ); Platform.postEventRule( $mtdbut\butcan );
// if cancel, reactivate the popup // if cancel, reactivate the popup
break; break;
case tdPromptCancel: case 2:
if( ! Platform.isEmpty( $tmpptsptapath ) ) if( ! Platform.isEmpty( $tmpptsptapath ) )
{ {
Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + "\\MTDBUT.DoPopup", 0 ); Platform.invokeModulePath( Platform.getModuleInfo( this, tdModuleInfoFullName ) + "\\MTDBUT.DoPopup", 0 );
......
...@@ -9,13 +9,13 @@ void ptsSetDetDscAndStlye(IDatafield argfld,#ptspta argptspta) ...@@ -9,13 +9,13 @@ void ptsSetDetDscAndStlye(IDatafield argfld,#ptspta argptspta)
if( Platform.compareTo($pty\adrsta, "T" )== 0) if( Platform.compareTo($pty\adrsta, "T" )== 0)
{ {
Platform.setDescription( argfld, #CT000080 ); // Platform.setDescription( argfld, #CT000080 );
// case PTY\ADRSTA.is ( "L" ) // case PTY\ADRSTA.is ( "L" )
// SetDescription( argfld, `Local` ) // SetDescription( argfld, `Local` )
} }
else else
{ {
Platform.setDescription( argfld, #CT000069 ); // Platform.setDescription( argfld, #CT000069 );
} }
} }
else else
...@@ -23,12 +23,12 @@ void ptsSetDetDscAndStlye(IDatafield argfld,#ptspta argptspta) ...@@ -23,12 +23,12 @@ void ptsSetDetDscAndStlye(IDatafield argfld,#ptspta argptspta)
if( Platform.isEmpty( $$argptspta\dbfadrblk ) ) if( Platform.isEmpty( $$argptspta\dbfadrblk ) )
{ {
Platform.setTDStyle( "", argfld ); Platform.setTDStyle( "", argfld );
Platform.setDescription( argfld, #CT000079 ); // Platform.setDescription( argfld, #CT000079 );
} }
else else
{ {
Platform.setTDStyle( "red", argfld ); Platform.setTDStyle( "red", argfld );
Platform.setDescription( argfld, #CT000071 ); // Platform.setDescription( argfld, #CT000071 );
} }
} }
......
...@@ -9,7 +9,7 @@ event $butmod order 1000 ...@@ -9,7 +9,7 @@ event $butmod order 1000
} }
if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld ) if( Platform.errorCode() == tdOdbcLocked || Platform.errorCode() == tdOdbcHeld )
{ {
Platform.errorMessage( #CT000110, Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime( GetLockTime ), 1, 5 ) ); Platform.errorMessage( #CT000110, Platform.trim( GetLockUID ), GetLockDate, Platform.mid( Platform.fmtTime((int) GetLockTime ), 1, 5 ) );
if(1==1) return; if(1==1) return;
} }
else else
......
...@@ -15,7 +15,7 @@ void ptsCheckAdrblk(String argtrigger) ...@@ -15,7 +15,7 @@ void ptsCheckAdrblk(String argtrigger)
{ {
if( Platform.isEmpty( $ptspta\tmpflg ) ) if( Platform.isEmpty( $ptspta\tmpflg ) )
{ {
Platform.errorMessage( #CT000009, Platform.getDescription( $det.getValue(), 1 ) ); // Platform.errorMessage( #CT000009, Platform.getDescription( $det.getValue(), 1 ) );
} }
else else
{ {
......
...@@ -20,7 +20,7 @@ event $ptspta\pts\adrblk order 900 ...@@ -20,7 +20,7 @@ event $ptspta\pts\adrblk order 900
} }
else else
{ {
prompt = Platform.prompt( #CT000015 ); prompt = Platform.prompt( #CT000015 ) ? 1 : 0;
} }
$\trnmod\ptsmod.ptsTmpAdrAddAuto( $ptspta, prompt ); $\trnmod\ptsmod.ptsTmpAdrAddAuto( $ptspta, prompt );
} }
......
...@@ -16,7 +16,7 @@ void getMethodStream(String argmetpfx,IStream argmetstm) ...@@ -16,7 +16,7 @@ void getMethodStream(String argmetpfx,IStream argmetstm)
if( stmCnt > 0 ) if( stmCnt > 0 )
{ {
// convert names to lower to ensure correct sort and replace Grid index with special value // convert names to lower to ensure correct sort and replace Grid index with special value
for(int idx = 1;idx <= stmCnt;idx++) for(idx = 1;idx <= stmCnt;idx++)
{ {
line = Platform.toLower( Platform.getLine( argmetstm, idx ) ); line = Platform.toLower( Platform.getLine( argmetstm, idx ) );
brcposIn = Platform.pos( line, "(" ); brcposIn = Platform.pos( line, "(" );
......
...@@ -21,8 +21,8 @@ boolean ptsIsRolSet(IModule arggrp,String role) ...@@ -21,8 +21,8 @@ boolean ptsIsRolSet(IModule arggrp,String role)
} }
else else
{ {
return false;
Platform.reraise(); Platform.reraise();
return false;
} }
} }
else else
......
...@@ -21,8 +21,8 @@ boolean ptsIsRolDefined(IModule arggrp,String role) ...@@ -21,8 +21,8 @@ boolean ptsIsRolDefined(IModule arggrp,String role)
} }
else else
{ {
return false;
Platform.reraise(); Platform.reraise();
return false;
} }
} }
else else
......
...@@ -8,8 +8,8 @@ init $\ order 1000 ...@@ -8,8 +8,8 @@ init $\ order 1000
{ {
Platform.disable( $seainf ); Platform.disable( $seainf );
} }
/**/ /**
/ until DDE becomes available for HTML client until DDE becomes available for HTML client
if GetClientType == ClientTypeHtml then if GetClientType == ClientTypeHtml then
Invisible( SEAINF ) Invisible( SEAINF )
endi**/ endi**/
......
event $dadsnd order 1000 event $dadsnd order 1000
{ {
//! Event handling the sending part of a Drag & Drop data transmission //! Event handling the sending part of a Drag & Drop data transmission
IStream DDSSTREAM = new StreamImpl();
Platform.clear( DDSSTREAM ); Platform.clear( DDSSTREAM );
Platform.tagSetContents( DDSSTREAM, "XDADSYSTEM", $\sysmod.getSystemName() ); // Record typ Platform.tagSetContents( DDSSTREAM, "XDADSYSTEM", $\sysmod.getSystemName() ); // Record typ
Platform.tagSetContents( DDSSTREAM, "XDADETYEXTKEY", $\sysmod\ety\extkey.getValue() ); // Current Base Entity Platform.tagSetContents( DDSSTREAM, "XDADETYEXTKEY", $\sysmod\ety\extkey.getValue() ); // Current Base Entity
......
check $awip\ptspta\pts\extkey order 900 check $awip\ptspta\pts\extkey order 900
{ {
// MT 756 only has Sender`s Correspondent and Receiver`s Correspondent // MT 756 only has Sender`s Correspondent and Receiver`s Correspondent
if( !( Platform.compareTo( $sftmt.getValue() , "756") ) == 0 ) if(( Platform.compareTo( $sftmt.getValue() , "756") ) != 0 )
{ {
if( Platform.isEmpty( $awip\ptspta\pts\extkey ) && ! Platform.isEmpty( $intp\ptspta\pts\extkey ) ) if( Platform.isEmpty( $awip\ptspta\pts\extkey ) && ! Platform.isEmpty( $intp\ptspta\pts\extkey ) )
{ {
......
...@@ -223,8 +223,8 @@ void recalcSesPay(#setgll argsetgll) ...@@ -223,8 +223,8 @@ void recalcSesPay(#setgll argsetgll)
// ORI // ORI
Platform.enable( $oriacc ); Platform.enable( $oriacc );
$orip\pansta = PanStaEdit; $orip\pansta = PanStaEdit;
/**/ /**
/CHALAB CHALAB
select case SFTMT select case SFTMT
case "752" case "752"
CHALAB = 'L0000075' CHALAB = 'L0000075'
......
...@@ -287,7 +287,7 @@ String swtPrtMT103Body(#setgll argsetgll) ...@@ -287,7 +287,7 @@ String swtPrtMT103Body(#setgll argsetgll)
} }
else else
{ {
if( snd53 = "HZCBCN2HFTU" && rec53 = "COMMCNSHFTU" ) if( "HZCBCN2HFTU".equals(snd53) && "COMMCNSHFTU".equals(rec53) )
{ {
seracc = ""; seracc = "";
extkey = ""; extkey = "";
......
...@@ -74,7 +74,7 @@ String swtPrtMT202cvBody(#setgll argsetgll) ...@@ -74,7 +74,7 @@ String swtPrtMT202cvBody(#setgll argsetgll)
{ {
accamt2 = Platform.fmtAmount( Platform.abs( $accamt.getValue() ), $acccur.getValue() ); accamt2 = Platform.fmtAmount( Platform.abs( $accamt.getValue() ), $acccur.getValue() );
accamt2 = swt202to32a( accamt2 ); accamt2 = swt202to32a( accamt2 );
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmountAB( ":32:", $valdat.getValue(), $acccur.getValue(), Platform.parseInt( accamt2 ) ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmountAB( ":32:", $valdat.getValue(), $acccur.getValue(), Platform.parseDecimal( accamt2 ) ) );
cur = $acccur; cur = $acccur;
} }
else else
......
...@@ -35,12 +35,12 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till) ...@@ -35,12 +35,12 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till)
cur = curBox.value; cur = curBox.value;
//AddTrnFee( "TRN" + feetyp + "U", feetyp + "U", "", feeunt, from, till, 0, 0, "", "" ) //AddTrnFee( "TRN" + feetyp + "U", feetyp + "U", "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" )
addTrnFee( "TRN" + feetyp + "E", feetyp + "E", "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "E", feetyp + "E", "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "J", feetyp + "J", "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "J", feetyp + "J", "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "H", feetyp + "H", "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "H", feetyp + "H", "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "U", feetyp + "U", "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "U", feetyp + "U", "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
// if $Cur = "USD" then // if $Cur = "USD" then
if( ! Platform.isEmpty( cur ) ) if( ! Platform.isEmpty( cur ) )
{ {
...@@ -48,27 +48,27 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till) ...@@ -48,27 +48,27 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till)
{ {
if( Platform.compareTo( cur , "EUR" ) == 0 ) if( Platform.compareTo( cur , "EUR" ) == 0 )
{ {
addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "E", feetyp + "E", feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "E", feetyp + "E", feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
else else
{ {
if( cur = "JPY" ) if( "JPY".equals(cur) )
{ {
addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "J", feetyp + "J", feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "J", feetyp + "J", feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
else else
{ {
if( cur = "HKD" ) if( "HKD".equals(cur) )
{ {
addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "H", feetyp + "H", feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "H", feetyp + "H", feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
else else
{ {
addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, "", feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
addTrnFee( "TRN" + feetyp + "U", feetyp + "U", feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp + "U", feetyp + "U", feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
} }
} }
...@@ -77,18 +77,18 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till) ...@@ -77,18 +77,18 @@ void addFeeData(String feetyp,String feeflg,int feeunt,Date from,Date till)
{ {
if( ! Platform.isEmpty( feeflg ) ) if( ! Platform.isEmpty( feeflg ) )
{ {
addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
} }
} }
else else
{ {
addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
} }
else else
{ {
addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, 0, 0, "", "" ); addTrnFee( "TRN" + feetyp, feetyp, feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
} }
......
...@@ -26,7 +26,7 @@ void det2cpr(boolean compress) ...@@ -26,7 +26,7 @@ void det2cpr(boolean compress)
Platform.streamClear( $setfel[d]\fepinrlst.getValue() ); Platform.streamClear( $setfel[d]\fepinrlst.getValue() );
free = 1; free = 1;
stmCnt = Platform.streamCount( inrs ); stmCnt = Platform.streamCount( inrs );
for(int i = 1;i <= stmCnt;i++) for(i = 1;i <= stmCnt;i++)
{ {
if( i == 1 ) if( i == 1 )
{ {
...@@ -57,7 +57,7 @@ void det2cpr(boolean compress) ...@@ -57,7 +57,7 @@ void det2cpr(boolean compress)
// if to compress, do compression for all fees of same FEECOD not modified to same party, where unit and amount are matching // if to compress, do compression for all fees of same FEECOD not modified to same party, where unit and amount are matching
if( gridcnt > 1 ) if( gridcnt > 1 )
{ {
for(int di = 2;di <= gridcnt;di++) for(di = 2;di <= gridcnt;di++)
{ {
d = getintidx( di ); d = getintidx( di );
if( Platform.compareTo( $setfel[d]\modflg , "r" ) == 0 ) if( Platform.compareTo( $setfel[d]\modflg , "r" ) == 0 )
......
...@@ -263,7 +263,7 @@ String dspCalc() ...@@ -263,7 +263,7 @@ String dspCalc()
{ {
return poolDef; return poolDef;
} }
break; // break;
case "S": case "S":
case "X": case "X":
return setDef; return setDef;
......
...@@ -12,14 +12,14 @@ void setKeyAmtForRol(String argrol) ...@@ -12,14 +12,14 @@ void setKeyAmtForRol(String argrol)
if( Platform.isEmpty( $keycur ) ) if( Platform.isEmpty( $keycur ) )
{ {
$keycur = $setgll[i]\acccur; $keycur = $setgll[i]\acccur;
$keyamt = $setgll[i]\accamt; $keyamt = $setgll[i]\accamt.intValue();
} }
else else
{ {
// if old amount set and same currency, add it // if old amount set and same currency, add it
if( Platform.compareTo( $keycur.getValue() , $setgll[i]\acccur ) == 0 ) if( Platform.compareTo( $keycur.getValue() , $setgll[i]\acccur ) == 0 )
{ {
$keyamt = Platform.numAdd($keyamt.getValue() , $setgll[i]\accamt.getValue()); $keyamt = Platform.numAdd($keyamt.getValue() , $setgll[i]\accamt.getValue()).intValue();
} }
else else
{ {
......
...@@ -61,122 +61,93 @@ void internalGllAdjust(BigDecimal argamt,String argcur,String srcmod,int srcidx) ...@@ -61,122 +61,93 @@ void internalGllAdjust(BigDecimal argamt,String argcur,String srcmod,int srcidx)
int free = -1; int free = -1;
int gridcnt = Platform.gridCount( $setgll ); int gridcnt = Platform.gridCount( $setgll );
// #######TODO 改写 LABEL与GOTO #### label lopfee // #######TODO 改写 LABEL与GOTO #### label lopfee
f = f + 1;
if( f > gridcnt ) lopfee:
{ while(true){
return ; // #######TODO 改写 LABEL与GOTO #### goto lopend f = f + 1;
} if( f > gridcnt ) {
if( Platform.isEmpty( $setgll[f]\rol ) ) //return ; // #######TODO #### goto lopend
{ break lopfee;
if( free < 0 ) }
{ if( Platform.isEmpty( $setgll[f]\rol ) ) {
free = f; if( free < 0 ) {
} free = f;
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee }
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(r, $setgll[f]\rol.getValue()) != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(r, $setgll[f]\rol.getValue()) != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(argcur, $setgll[f]\cur.getValue()) != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(argcur, $setgll[f]\cur.getValue()) != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(d, $setgll[f]\flg.getValue()) != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(d, $setgll[f]\flg.getValue()) != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(gllGrp, $setgll[f]\gllgrp.getValue()) != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(gllGrp, $setgll[f]\gllgrp.getValue()) != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(fcdinr, $setgll[f]\fcdinr.getValue()) != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(fcdinr, $setgll[f]\fcdinr.getValue()) != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(act, $setgll[f]\act.getValue()) != 0 && Platform.compareTo( dspflg , "A" ) == 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(act, $setgll[f]\act.getValue()) != 0 && Platform.compareTo( dspflg , "A" ) == 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo( dspflg , "A" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "A") != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo( dspflg , "A" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "A") != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(dspflg, "A") != 0 && Platform.compareTo( $setgll[f]\dspflg , "A" ) == 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(dspflg, "A") != 0 && Platform.compareTo( $setgll[f]\dspflg , "A" ) == 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo( dspflg , "B" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "B") != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo( dspflg , "C" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "C") != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(dspflg, "B") != 0 && Platform.compareTo( $setgll[f]\dspflg , "B" ) == 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(dspflg, "C") != 0 && Platform.compareTo( $setgll[f]\dspflg , "C" ) == 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo( dspflg , "E" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "E") != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo( dspflg , "F" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "F") != 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo(dspflg, "E") != 0 && Platform.compareTo( $setgll[f]\dspflg , "E" ) == 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee if( Platform.compareTo(dspflg, "F") != 0 && Platform.compareTo( $setgll[f]\dspflg , "F" ) == 0 ) {
} //return ; // #######TODO #### goto lopfee
if( Platform.compareTo( dspflg , "H" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "H") != 0 ) continue lopfee;
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee // don`t mix debits and credits (if not allowed by SetDebCreAlw)
} if( Platform.Sgn( $setgll[f]\amt.getValue() ) * Platform.Sgn( argamt ) < 0 && Platform.isEmpty( $\setmod\debcrealwflg ) ) {
if( Platform.compareTo(dspflg, "H") != 0 && Platform.compareTo( $setgll[f]\dspflg , "H" ) == 0 ) //return ; // #######TODO #### goto lopfee
{ continue lopfee;
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee }
} if( Platform.compareTo( $setgll[f]\modflg , "-" ) == 0 ) {
if( Platform.compareTo( dspflg , "C" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "C") != 0 ) if( n == -1 ) {
{ n = f;
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee $setgll[f]\amt = new BigDecimal("0");
} Platform.resetModified( $setgll[f]\amt.getValue() );
if( Platform.compareTo(dspflg, "C") != 0 && Platform.compareTo( $setgll[f]\dspflg , "C" ) == 0 ) $setgll[f]\donflg = "x";
{ } else {
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee Platform.clear( $setgll[f] );
} $setgll[f]\macold = "<Recalc>";
if( Platform.compareTo( dspflg , "F" ) == 0 && Platform.compareTo($setgll[f]\dspflg.getValue(), "F") != 0 ) }
{ } else {
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee b = Platform.numSub(b , $setgll[f]\amt.getValue());
} $setgll[f]\donflg = "x";
if( Platform.compareTo(dspflg, "F") != 0 && Platform.compareTo( $setgll[f]\dspflg , "F" ) == 0 ) internalSetValdat( f, valdat );
{ }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee //return ; // #######TODO #### goto lopfee
} continue lopfee;
// don`t mix debits and credits (if not allowed by SetDebCreAlw)
if( Platform.Sgn( $setgll[f]\amt.getValue() ) * Platform.Sgn( argamt ) < 0 && Platform.isEmpty( $\setmod\debcrealwflg ) )
{
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee
}
/**if GetFramename = "CPTOPN" then
SETGLL( $f )\DONFLG = "x"
goto lopfee
endif**/
if( Platform.compareTo( $setgll[f]\modflg , "-" ) == 0 )
{
if( n == -1 )
{
n = f;
$setgll[f]\amt = new BigDecimal("0");
Platform.resetModified( $setgll[f]\amt.getValue() );
$setgll[f]\donflg = "x";
}
else
{
Platform.clear( $setgll[f] );
$setgll[f]\macold = "<Recalc>";
}
}
else
{
b = Platform.numSub(b , $setgll[f]\amt.getValue());
$setgll[f]\donflg = "x";
internalSetValdat( f, valdat );
} }
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee
// #######TODO 改写 LABEL与GOTO #### label lopend // #######TODO 改写 LABEL与GOTO #### label lopend
if( Platform.compareTo( b , 0 ) == 0 && ( Platform.isEmpty( amtIDsStm ) || Platform.isEmpty( $creemplinflg ) ) ) if( Platform.compareTo( b , 0 ) == 0 && ( Platform.isEmpty( amtIDsStm ) || Platform.isEmpty( $creemplinflg ) ) )
{ {
......
...@@ -21,28 +21,34 @@ void internalGlgDistrib() ...@@ -21,28 +21,34 @@ void internalGlgDistrib()
// Delete Done-Flag // Delete Done-Flag
int i = 1; int i = 1;
String trnset = ""; String trnset = "";
// #######TODO 改写 LABEL与GOTO #### label lop1
if( i > gridcnt ) lop1:
{ while(true){
return ; // #######TODO 改写 LABEL与GOTO #### goto don1 // #######TODO 改写 LABEL与GOTO #### label lop1
} if( i > gridcnt )
$setgll[i]\donflg = " "; {
$setgll[i]\accamtfix = " "; //return ; // #######TODO 改写 LABEL与GOTO #### goto don1
if( Platform.isModified( $setgll[i]\amt ) ) break lop1;
{ }
$setgll[i]\modflg = "a"; $setgll[i]\donflg = " ";
} $setgll[i]\accamtfix = " ";
if( Platform.isModified( $setgll[i]\accamt ) ) if( Platform.isModified( $setgll[i]\amt ) )
{ {
$setgll[i]\modflg = "b"; $setgll[i]\modflg = "a";
} }
if( Platform.isEmpty( $setgll[i]\setxxxrow ) ) if( Platform.isModified( $setgll[i]\accamt ) )
{ {
setSumMax = setSumMax + 1; $setgll[i]\modflg = "b";
$setgll[i]\setxxxrow = setSumMax; }
if( Platform.isEmpty( $setgll[i]\setxxxrow ) )
{
setSumMax = setSumMax + 1;
$setgll[i]\setxxxrow = setSumMax;
}
i = i + 1;
//return ; // #######TODO 改写 LABEL与GOTO #### goto lop1
continue lop1;
} }
i = i + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto lop1
// #######TODO 改写 LABEL与GOTO #### label don1 // #######TODO 改写 LABEL与GOTO #### label don1
// Check all lines of Workgrid and add, if necessary // Check all lines of Workgrid and add, if necessary
for(int f = 1;f <= gridcnt;f++) for(int f = 1;f <= gridcnt;f++)
...@@ -52,37 +58,50 @@ void internalGlgDistrib() ...@@ -52,37 +58,50 @@ void internalGlgDistrib()
$setgll[f].cnvAmtAccamt(); $setgll[f].cnvAmtAccamt();
} }
int w = 0; int w = 0;
// #######TODO 改写 LABEL与GOTO #### label lopwrk
w = w + 1; lopwrk:
if( w > Platform.streamCount( $wrksumcon.getValue() ) ) while(true){
{ // #######TODO 改写 LABEL与GOTO #### label lopwrk
return ; // #######TODO 改写 LABEL与GOTO #### goto donwrk w = w + 1;
if( w > Platform.streamCount( $wrksumcon.getValue() ) )
{
//return ; // #######TODO 改写 LABEL与GOTO #### goto donwrk
break lopwrk;
}
internalWrksumGetByIdx( w );
internalGllAdjust( $wrksum\amt.getValue(), $wrksum\cur.getValue(), "WRKSUM", w );
// return ; // #######TODO 改写 LABEL与GOTO #### goto lopwrk
continue lopwrk;
} }
internalWrksumGetByIdx( w );
internalGllAdjust( $wrksum\amt.getValue(), $wrksum\cur.getValue(), "WRKSUM", w );
return ; // #######TODO 改写 LABEL与GOTO #### goto lopwrk
// #######TODO 改写 LABEL与GOTO #### label donwrk // #######TODO 改写 LABEL与GOTO #### label donwrk
int f = 1; int f = 1;
// #######TODO 改写 LABEL与GOTO #### label lopfee2
if( f > gridcnt ) lopfee2:
{ while(true){
return ; // #######TODO 改写 LABEL与GOTO #### goto donfee2 // #######TODO 改写 LABEL与GOTO #### label lopfee2
} if( f > gridcnt )
if( Platform.compareTo( $setgll[f]\donflg , " " ) == 0 ) {
{ //return ; // #######TODO 改写 LABEL与GOTO #### goto donfee2
if( Platform.compareTo( $setgll[f]\modflg , "-" ) == 0 && Platform.isEmpty( $setgll[f]\glpinr ) ) break lopfee2;
{ }
Platform.clear( $setgll[f]\dsp ); if( Platform.compareTo( $setgll[f]\donflg , " " ) == 0 )
Platform.clear( $setgll[f] ); {
$setgll[f]\macold = "<Recalc>"; if( Platform.compareTo( $setgll[f]\modflg , "-" ) == 0 && Platform.isEmpty( $setgll[f]\glpinr ) )
} {
else Platform.clear( $setgll[f]\dsp );
{ Platform.clear( $setgll[f] );
internalGllAdjust( 0, $setgll[f]\cur.getValue(), "SETGLL", f ); $setgll[f]\macold = "<Recalc>";
} }
else
{
internalGllAdjust( BigDecimal.ZERO, $setgll[f]\cur.getValue(), "SETGLL", f );
}
}
f = f + 1;
//return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee2
continue lopfee2;
} }
f = f + 1;
return ; // #######TODO 改写 LABEL与GOTO #### goto lopfee2
// #######TODO 改写 LABEL与GOTO #### label donfee2 // #######TODO 改写 LABEL与GOTO #### label donfee2
for( f = 1;f <= gridcnt;f++) for( f = 1;f <= gridcnt;f++)
{ {
......
...@@ -35,7 +35,7 @@ void recalcSetglgEog() ...@@ -35,7 +35,7 @@ void recalcSetglgEog()
oldlin = Platform.parseInt( Platform.mid( ctllin, Platform.pos( ctllin, "\t" ) + 1 ) ); oldlin = Platform.parseInt( Platform.mid( ctllin, Platform.pos( ctllin, "\t" ) + 1 ) );
Platform.clear( $setgll[i]\acccpramt ); Platform.clear( $setgll[i]\acccpramt );
// the old line gets amount of this line, if same direction or amount in old line is greater or equal amount of this line // the old line gets amount of this line, if same direction or amount in old line is greater or equal amount of this line
if( Platform.Sgn( $setgll[oldlin]\acccpramt.getValue() ) == Platform.Sgn( $setgll[i]\accamt.getValue() ) || Platform.abs( $setgll[oldlin]\acccpramt.getValue() ) >= Platform.abs( $setgll[i]\accamt.getValue() ) ) if( Platform.Sgn( $setgll[oldlin]\acccpramt.getValue() ) == Platform.Sgn( $setgll[i]\accamt.getValue() ) || Platform.abs( $setgll[oldlin]\acccpramt.getValue() ).compareTo(Platform.abs( $setgll[i]\accamt.getValue() )) >= 0 )
{ {
$setgll[oldlin]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue()); $setgll[oldlin]\acccpramt = Platform.numAdd($setgll[oldlin]\acccpramt.getValue() , $setgll[i]\accamt.getValue());
Platform.streamClear( $setgll[i]\cprlinlst.getValue() ); Platform.streamClear( $setgll[i]\cprlinlst.getValue() );
...@@ -56,7 +56,7 @@ void recalcSetglgEog() ...@@ -56,7 +56,7 @@ void recalcSetglgEog()
} }
for(int i = 1;i <= gridcnt;i++) for(int i = 1;i <= gridcnt;i++)
{ {
$setgll[i]\fmtacccpramt = new BigDecimal(Platform.abs( $setgll[i]\acccpramt.getValue() )); $setgll[i]\fmtacccpramt = Platform.abs( $setgll[i]\acccpramt.getValue() );
switch( Platform.streamCount( $setgll[i]\cprlinlst.getValue() ) ) switch( Platform.streamCount( $setgll[i]\cprlinlst.getValue() ) )
{ {
case 1: case 1:
......
...@@ -2,7 +2,7 @@ boolean isexternaldsp(String dsp) ...@@ -2,7 +2,7 @@ boolean isexternaldsp(String dsp)
{ {
//去掉PAY的控制 //去掉PAY的控制
// 去掉这个判断 // 去掉这个判断
return false; // return false;
if( Platform.compareTo( dsp , "BAT" ) == 0 || Platform.compareTo( dsp , "TRF" ) == 0 ) if( Platform.compareTo( dsp , "BAT" ) == 0 || Platform.compareTo( dsp , "TRF" ) == 0 )
{ {
//if Dsp = "BAT" or Dsp = "TRF" or Dsp = "PAY" then //if Dsp = "BAT" or Dsp = "TRF" or Dsp = "PAY" then
......
...@@ -60,7 +60,7 @@ void getRateXrtWithResRatesZZZ(String argcur,String bascur,boolean ininflg,Strin ...@@ -60,7 +60,7 @@ void getRateXrtWithResRatesZZZ(String argcur,String bascur,boolean ininflg,Strin
} }
else else
{ {
if( ( argcur = "JPY" ) ) if( "JPY".equals(argcur) )
{ {
vrat = Platform.numSub($\cbsmod\xrtmod\xrt\selrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\selrat.getValue() , 1000000)); vrat = Platform.numSub($\cbsmod\xrtmod\xrt\selrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\selrat.getValue() , 1000000));
vsqrrat = Platform.numSub(Platform.numSub($\cbsmod\xrtmod\xrt\selrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\selrat.getValue() , 1000000)) , Platform.numMul($\cbsmod\xrtmod\cur\sqrmar.getValue() , $\cbsmod\xrtmod\xrtratdir.getValue())); vsqrrat = Platform.numSub(Platform.numSub($\cbsmod\xrtmod\xrt\selrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\selrat.getValue() , 1000000)) , Platform.numMul($\cbsmod\xrtmod\cur\sqrmar.getValue() , $\cbsmod\xrtmod\xrtratdir.getValue()));
...@@ -97,7 +97,7 @@ void getRateXrtWithResRatesZZZ(String argcur,String bascur,boolean ininflg,Strin ...@@ -97,7 +97,7 @@ void getRateXrtWithResRatesZZZ(String argcur,String bascur,boolean ininflg,Strin
} }
else else
{ {
if( ( argcur = "JPY" ) ) if( "JPY".equals(argcur) )
{ {
vrat = Platform.numAdd($\cbsmod\xrtmod\xrt\buyrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\buyrat.getValue() , 1000000)); vrat = Platform.numAdd($\cbsmod\xrtmod\xrt\buyrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\buyrat.getValue() , 1000000));
vsqrrat = Platform.numAdd(Platform.numAdd($\cbsmod\xrtmod\xrt\buyrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\buyrat.getValue() , 1000000)) , Platform.numMul($\cbsmod\xrtmod\cur\sqrmar.getValue() , $\cbsmod\xrtmod\xrtratdir.getValue())); vsqrrat = Platform.numAdd(Platform.numAdd($\cbsmod\xrtmod\xrt\buyrat.getValue() , Platform.numDiv($\trnmod\ptsmod\ptyrat\buyrat.getValue() , 1000000)) , Platform.numMul($\cbsmod\xrtmod\cur\sqrmar.getValue() , $\cbsmod\xrtmod\xrtratdir.getValue()));
......
...@@ -81,7 +81,7 @@ boolean checkXrtChg() ...@@ -81,7 +81,7 @@ boolean checkXrtChg()
} }
if( buytyp == 1 ) if( buytyp == 1 )
{ {
prompt = Platform.prompt( #CT000013, buycur, buymidratbefore, buymidratchage ); prompt = Platform.prompt( #CT000013, buycur, buymidratbefore, buymidratchage ) ? 1: 0;
if( prompt == 1 ) if( prompt == 1 )
{ {
boolVar = false; boolVar = false;
...@@ -93,7 +93,7 @@ boolean checkXrtChg() ...@@ -93,7 +93,7 @@ boolean checkXrtChg()
} }
if( seltyp == 1 ) if( seltyp == 1 )
{ {
prompt = Platform.prompt( #CT000014, selcur, selmidratbefore, selmidratchage ); prompt = Platform.prompt( #CT000014, selcur, selmidratbefore, selmidratchage ) ? 1: 0;
if( prompt == 1 ) if( prompt == 1 )
{ {
boolVar = false; boolVar = false;
......
...@@ -435,11 +435,11 @@ void clcrat() ...@@ -435,11 +435,11 @@ void clcrat()
if( ( ! ininflg ) && ( Platform.compareTo($cur.getValue(), $acccur.getValue()) != 0 ) ) if( ( ! ininflg ) && ( Platform.compareTo($cur.getValue(), $acccur.getValue()) != 0 ) )
{ {
// if couter value in system currency is greater as maximum rate amount for account or contract currency only allow reserved rates (if not forward contract) // if couter value in system currency is greater as maximum rate amount for account or contract currency only allow reserved rates (if not forward contract)
xrfamt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $acccur.getValue(), $accamt.getValue(), vald ) ); xrfamt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $acccur.getValue(), $accamt.getValue(), vald ) ).intValue();
curMaxAmt = $\cbsmod\xrtmod.getCurMaxAmt( $cur.getValue() ); curMaxAmt = $\cbsmod\xrtmod.getCurMaxAmt( $cur.getValue() );
curXrfAmt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $\cbsmod\xrtmod\caccur\maxcur.getValue(), curMaxAmt, vald ) ); curXrfAmt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $\cbsmod\xrtmod\caccur\maxcur.getValue(), curMaxAmt, vald ) ).intValue();
accCurMaxAmt = $\cbsmod\xrtmod.getCurMaxAmt( $acccur.getValue() ); accCurMaxAmt = $\cbsmod\xrtmod.getCurMaxAmt( $acccur.getValue() );
accCurXrfAmt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $\cbsmod\xrtmod\caccur\maxcur.getValue(), accCurMaxAmt, vald ) ); accCurXrfAmt = Platform.abs( $\cbsmod\xrtmod.basCurEqu ( $\cbsmod\xrtmod\caccur\maxcur.getValue(), accCurMaxAmt, vald ) ).intValue();
if( ( xrfamt > curXrfAmt || xrfamt > accCurXrfAmt ) && Platform.isEmpty( $fcdinr ) ) if( ( xrfamt > curXrfAmt || xrfamt > accCurXrfAmt ) && Platform.isEmpty( $fcdinr ) )
{ {
Platform.setFieldValue( $rattyp, "RX" + "\r\n" + "R" ); Platform.setFieldValue( $rattyp, "RX" + "\r\n" + "R" );
......
...@@ -78,11 +78,11 @@ void recalcSetgllStdDft(String argrow) ...@@ -78,11 +78,11 @@ void recalcSetgllStdDft(String argrow)
// If forward contract, style is set to red. // If forward contract, style is set to red.
if( Platform.isEmpty( $fchchkflg ) ) if( Platform.isEmpty( $fchchkflg ) )
{ {
Platform.setTDStyle( "", $det ); //Platform.setTDStyle( "", $det );
} }
else else
{ {
Platform.setTDStyle( "red", $det ); //Platform.setTDStyle( "red", $det );
} }
// If no role is set, the button is disabled // If no role is set, the button is disabled
if( Platform.isEmpty( $rol ) ) if( Platform.isEmpty( $rol ) )
...@@ -103,7 +103,7 @@ void recalcSetgllStdDft(String argrow) ...@@ -103,7 +103,7 @@ void recalcSetgllStdDft(String argrow)
{ {
Platform.enable( $fmtaccamt ); Platform.enable( $fmtaccamt );
} }
$fmtaccamt = new BigDecimal(Platform.abs( $accamt.getValue() )); $fmtaccamt = Platform.abs( $accamt.getValue() );
// from default FMTAMT // from default FMTAMT
//! set FMTAMT from amt and enable if role is set for this line and conversion not set by transaction //! set FMTAMT from amt and enable if role is set for this line and conversion not set by transaction
if( Platform.isEmpty( $rol ) || ( Platform.compareTo( $accamtfix.getValue() , "T" ) == 0 ) ) if( Platform.isEmpty( $rol ) || ( Platform.compareTo( $accamtfix.getValue() , "T" ) == 0 ) )
...@@ -120,7 +120,7 @@ void recalcSetgllStdDft(String argrow) ...@@ -120,7 +120,7 @@ void recalcSetgllStdDft(String argrow)
Platform.enable( $fmtaccamt ); Platform.enable( $fmtaccamt );
Platform.enable( $fmtamt ); Platform.enable( $fmtamt );
} }
$fmtamt = new BigDecimal(Platform.abs( $amt.getValue() )); $fmtamt = Platform.abs( $amt.getValue() );
// from default INTACTID // from default INTACTID
if( Platform.compareTo( $intp\pansta , PanStaEdit ) == 0 && ( $setgrp\int.isRolSet() ) ) if( Platform.compareTo( $intp\pansta , PanStaEdit ) == 0 && ( $setgrp\int.isRolSet() ) )
{ {
...@@ -277,7 +277,7 @@ void recalcSetgllStdDft(String argrow) ...@@ -277,7 +277,7 @@ void recalcSetgllStdDft(String argrow)
Boolean ininflg = null; Boolean ininflg = null;
BigDecimal sysrat = null; BigDecimal sysrat = null;
BigDecimal sqrrat = null; BigDecimal sqrrat = null;
int refamt = 0; BigDecimal refamt = BigDecimal.ZERO;
if( Platform.compareTo( $acccur.getValue() , $cur.getValue() ) == 0 ) if( Platform.compareTo( $acccur.getValue() , $cur.getValue() ) == 0 )
{ {
$xrfamt = $\cbsmod\xrtmod.basCurEqu ( $cur.getValue(), $amt.getValue(), Platform.today() ); $xrfamt = $\cbsmod\xrtmod.basCurEqu ( $cur.getValue(), $amt.getValue(), Platform.today() );
...@@ -303,7 +303,7 @@ void recalcSetgllStdDft(String argrow) ...@@ -303,7 +303,7 @@ void recalcSetgllStdDft(String argrow)
sysrat = sysratBox.value; sysrat = sysratBox.value;
sqrrat = sqrratBox.value; sqrrat = sqrratBox.value;
refamt = 0; refamt = BigDecimal.ZERO;
Argument<String> bscurBox1 = new Argument<String>("",bscur); Argument<String> bscurBox1 = new Argument<String>("",bscur);
Argument<BigDecimal> refamtBox = new Argument<BigDecimal>("",refamt); Argument<BigDecimal> refamtBox = new Argument<BigDecimal>("",refamt);
$xrfamt = $\cbsmod\xrtmod.amtConvRates( $amt.getValue(), $dcbextrat.getValue(), sysrat, $cur.getValue(), $\cbsmod\xrtmod.sysiso(), bscurBox1, refamtBox ); $xrfamt = $\cbsmod\xrtmod.amtConvRates( $amt.getValue(), $dcbextrat.getValue(), sysrat, $cur.getValue(), $\cbsmod\xrtmod.sysiso(), bscurBox1, refamtBox );
......
...@@ -45,7 +45,7 @@ String getACTPTAINR(String actdsp) ...@@ -45,7 +45,7 @@ String getACTPTAINR(String actdsp)
return $\setmod\setpty\actptainr.getValue(); return $\setmod\setpty\actptainr.getValue();
} }
// case "INC", "IND", "SID" // case "INC", "IND", "SID"
break; // break;
case "IN": case "IN":
return $\sysmod\ety\ownptainr.getValue(); return $\sysmod\ety\ownptainr.getValue();
default: default:
......
...@@ -2,7 +2,7 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin ...@@ -2,7 +2,7 @@ void cnv2RatCeb(String scbcur,String dcbcur,int scbrat,int dcbrat,Argument<Strin
{ {
// Add by ZJ on Feb 2008 // Add by ZJ on Feb 2008
// 从5.01移植 // 从5.01移植
rate.value = 0.000000; rate.value = 0;
String rmb = $\cbsmod\xrtmod.sysiso(); String rmb = $\cbsmod\xrtmod.sysiso();
if( ( dcbrat == 0 || scbrat == 0 ) ) if( ( dcbrat == 0 || scbrat == 0 ) )
{ {
......
...@@ -38,7 +38,7 @@ String actGetBlk(String sql,#act selact) ...@@ -38,7 +38,7 @@ String actGetBlk(String sql,#act selact)
// 在Stream保存完整账号及对应的科目号 // 在Stream保存完整账号及对应的科目号
Argument<String> acttypBox = new Argument<String>(); Argument<String> acttypBox = new Argument<String>();
Argument<String> namBox = new Argument<String>(); Argument<String> namBox = new Argument<String>();
Platform.getTermTypField( $$selact\trmtyp.getValue(), acttypBox, namBox ); Platform.getTermTypField_subp( $$selact\trmtyp.getValue(), acttypBox, namBox );
acttyp = acttypBox.value; acttyp = acttypBox.value;
nam = namBox.value; nam = namBox.value;
...@@ -50,7 +50,7 @@ String actGetBlk(String sql,#act selact) ...@@ -50,7 +50,7 @@ String actGetBlk(String sql,#act selact)
Argument<String> seqnoBox = new Argument<String>(); Argument<String> seqnoBox = new Argument<String>();
Argument<String> prttypBox = new Argument<String>(); Argument<String> prttypBox = new Argument<String>();
Argument<String> namBox1 = new Argument<String>("",nam); Argument<String> namBox1 = new Argument<String>("",nam);
Platform.getActTypField( acttyp, notypBox, reptypBox, term_idBox, term_namBox, seqnoBox, prttypBox, namBox1 ); Platform.getActTypField_subp( acttyp, notypBox, reptypBox, term_idBox, term_namBox, seqnoBox, prttypBox, namBox1 );
notyp = notypBox.value; notyp = notypBox.value;
reptyp = reptypBox.value; reptyp = reptypBox.value;
......
...@@ -3,6 +3,7 @@ default $acttrmtyp order 1000 ...@@ -3,6 +3,7 @@ default $acttrmtyp order 1000
int err = 0; int err = 0;
int pos = 0; int pos = 0;
String trmTyp = NULLSTR; String trmTyp = NULLSTR;
String text = NULLSTR;
if( ! Platform.isEmpty( $acttrmcod ) ) if( ! Platform.isEmpty( $acttrmcod ) )
{ {
text = Platform.GetCodeValueText( $acttrmcod.getValue(), $acttrmcod.getValue() ); text = Platform.GetCodeValueText( $acttrmcod.getValue(), $acttrmcod.getValue() );
......
...@@ -14,8 +14,8 @@ default $abqget\abqp\decnum order 1000 ...@@ -14,8 +14,8 @@ default $abqget\abqp\decnum order 1000
Platform.error( $act, #CT000212 ); Platform.error( $act, #CT000212 );
} }
} }
/**/ /**
/单证类的收、付款交易不申报的时候也自动产生申报号码 //单证类的收、付款交易不申报的时候也自动产生申报号码
for $Idx = 1 to GridCount( \SETMOD\SETGLG\SETGLL ) for $Idx = 1 to GridCount( \SETMOD\SETGLG\SETGLL )
if Mid( GetFramename, 1, 2 ) <> "CP" then if Mid( GetFramename, 1, 2 ) <> "CP" then
$ctycod1 = \SETMOD\SETGLG\SETGLL( $Idx )\ABQGET\ABQP\ABQSEL\COUNTRY $ctycod1 = \SETMOD\SETGLG\SETGLL( $Idx )\ABQGET\ABQP\ABQSEL\COUNTRY
......
...@@ -6,7 +6,7 @@ event $dcbextrat order 1000 ...@@ -6,7 +6,7 @@ event $dcbextrat order 1000
{ {
Platform.clear( $extkey ); Platform.clear( $extkey );
Platform.clear( $psw ); Platform.clear( $psw );
Platform.popupTitledFrame( $chkratpan, "**********请输入授权柜员号和密码**********", false, 244, 189 ); //Platform.popupTitledFrame( $chkratpan, "**********请输入授权柜员号和密码**********", false, 244, 189 );
} }
else else
{ {
......
...@@ -25,7 +25,7 @@ event $delapl order 1000 ...@@ -25,7 +25,7 @@ event $delapl order 1000
Platform.exitEvent(); Platform.exitEvent();
} }
} }
if( Platform.prompt( #CT000233 ) == tdPromptYes ) if( Platform.prompt( #CT000233 ) == MdaUtilsEx.intConvertBoolean(tdPromptYes) )
{ {
} }
else else
......
...@@ -6,7 +6,7 @@ event $scbextrat order 1000 ...@@ -6,7 +6,7 @@ event $scbextrat order 1000
{ {
Platform.clear( $extkey ); Platform.clear( $extkey );
Platform.clear( $psw ); Platform.clear( $psw );
Platform.popupTitledFrame( $chkratpan, "**********请输入授权柜员号和密码**********", false, 244, 189 ); //Platform.popupTitledFrame( $chkratpan, "**********请输入授权柜员号和密码**********", false, 244, 189 );
} }
else else
{ {
......
...@@ -19,7 +19,7 @@ void savIfNotChanged() ...@@ -19,7 +19,7 @@ void savIfNotChanged()
Platform.setActivePanel( $setpan, true ); Platform.setActivePanel( $setpan, true );
ignore = Platform.errorCode(); ignore = Platform.errorCode();
} }
dsc = Platform.getDescription( $\mtabut\sav.getValue() ); //dsc = Platform.getDescription( $\mtabut\sav.getValue() );
posAnd = Platform.pos( dsc, "&" ); posAnd = Platform.pos( dsc, "&" );
if( posAnd > 0 ) if( posAnd > 0 )
{ {
......
...@@ -9,7 +9,7 @@ String setmodSetGllAmt(String argid,String argrol,String argcur,int argamt,Strin ...@@ -9,7 +9,7 @@ String setmodSetGllAmt(String argid,String argrol,String argcur,int argamt,Strin
//! ArgAmttyp : Type of amount. See Codetable SETSUMW:DOCAMTTYP for types available. Usually empty //! ArgAmttyp : Type of amount. See Codetable SETSUMW:DOCAMTTYP for types available. Usually empty
//! //!
//! Uses SETGLG.SetglgAddAmount. If necessary additional fields can be set using SetglgAddAmtFld... -functions in SETGLG. //! Uses SETGLG.SetglgAddAmount. If necessary additional fields can be set using SetglgAddAmtFld... -functions in SETGLG.
String amtRef = $setglg.setglgAddAmount( argid, argrol, argcur, argamt, argamttyp, "", "", "", "" ); String amtRef = $setglg.setglgAddAmount( argid, argrol, argcur, BigDecimal.valueOf(argamt), argamttyp, "", "", "", "" );
if( ! Platform.isEmpty( argvaldat ) ) if( ! Platform.isEmpty( argvaldat ) )
{ {
$setglg.setglgAddAmtFldValDat( argid, amtRef, argvaldat ); $setglg.setglgAddAmtFldValDat( argid, amtRef, argvaldat );
......
...@@ -23,6 +23,7 @@ void setPtyAvailableRoles(String argrolallow) ...@@ -23,6 +23,7 @@ void setPtyAvailableRoles(String argrolallow)
else else
{ {
Platform.reraise(); Platform.reraise();
IStream allwStm = new StreamImpl();
if( Platform.streamSearch( allwStm, rol ) > 0 ) if( Platform.streamSearch( allwStm, rol ) > 0 )
{ {
Platform.cacheWrite( $setpty, "SETPTYINR", $setpty\ptyinr.getValue() ); Platform.cacheWrite( $setpty, "SETPTYINR", $setpty\ptyinr.getValue() );
......
...@@ -42,125 +42,143 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in ...@@ -42,125 +42,143 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in
BigDecimal amt = null; BigDecimal amt = null;
String sgn = NULLSTR; String sgn = NULLSTR;
int idx = 0; int idx = 0;
for(int a = 1;a <= gridcnt;a++) Restart:
{ while(true){
if( Platform.compareTo( rol , getGllRol( $setfeg\setfel[a]\rol.getValue() ) ) == 0 && ( ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 ) || ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)<0 && Platform.compareTo(argdirflg, "D") != 0 ) ) && ( Platform.compareTo( $setfeg\setfel[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) ) entCnt = 0;
{ res = new StreamImpl();
// DO5CS.703597 Platform.streamClear( res );
typ = ""; totAmt = 0;
if( ! Platform.isEmpty( altCT ) ) totCur = "";
{ curCnt = 0;
typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feecod.getValue(), altCT, UilSwift ); // scan grid of own fees
} gridcnt = Platform.gridCount( $setfeg\setfel );
if( Platform.isEmpty( typ ) ) typ = null;
{ amt = null;
typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feesftcod.getValue(), "FEESFT", UilSwift ); sgn = null;
} idx = 0;
amt = $setfeg\setfel[a]\amt; for(int a = 1;a <= gridcnt;a++)
if( Platform.compareTo(amt , 0)<0 )
{
sgn = "-";
}
else
{
sgn = "+";
}
if( Platform.isEmpty( typ ) || allMisc )
{ {
typ = sgn + "/MISC/"; if( Platform.compareTo( rol , getGllRol( $setfeg\setfel[a]\rol.getValue() ) ) == 0 && ( ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 ) || ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)<0 && Platform.compareTo(argdirflg, "D") != 0 ) ) && ( Platform.compareTo( $setfeg\setfel[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
}
else
{
typ = sgn + typ;
}
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) );
}
else
{
Platform.streamInsert( res, 0, typ );
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) );
Platform.streamInsert( res, 0, "CUR" + $setfeg\setfel[a]\cur.getValue() );
entCnt = entCnt + 1;
}
}
}
// scan grid of foreign charges
gridcnt = Platform.gridCount( $setfog\setfol );
for(int a = 1;a <= gridcnt;a++)
{
amt = new BigDecimal("0");
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptypay.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "D") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numAdd(amt , $setfog\setfol[a]\amt.getValue());
}
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptydbt.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numSub(amt , $setfog\setfol[a]\amt.getValue());
}
if( ! Platform.isEmpty( amt ) )
{
// use different codewords for debiting and paying foreign charges
if( Platform.compareTo(amt , 0)<0 )
{
sgn = "-";
// DO5CS.703597
switch( $\trnmod\trndoc\doccur\mt.getValue() )
{ {
case "400": // DO5CS.703597
typ = sgn + "/YOURCHAR/"; typ = "";
break; if( ! Platform.isEmpty( altCT ) )
default: {
typ = sgn + "/CORCOM/"; typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feecod.getValue(), altCT, UilSwift );
}
if( Platform.isEmpty( typ ) )
{
typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feesftcod.getValue(), "FEESFT", UilSwift );
}
amt = $setfeg\setfel[a]\amt;
if( Platform.compareTo(amt , 0)<0 )
{
sgn = "-";
}
else
{
sgn = "+";
}
if( Platform.isEmpty( typ ) || allMisc )
{
typ = sgn + "/MISC/";
}
else
{
typ = sgn + typ;
}
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) );
}
else
{
Platform.streamInsert( res, 0, typ );
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) );
Platform.streamInsert( res, 0, "CUR" + $setfeg\setfel[a]\cur.getValue() );
entCnt = entCnt + 1;
}
} }
} }
else // scan grid of foreign charges
{ gridcnt = Platform.gridCount( $setfog\setfol );
sgn = "+"; for(int a = 1;a <= gridcnt;a++)
// DO5CS.703597
typ = sgn + "/CORCOM/";
/**
select case \TRNMOD\TRNDOC\DOCCUR\MT
case "750", "754"
$Typ = $Sgn + "/YOURCHAR/"
case else
$Typ = $Sgn + "/CORCOM/"
end select
**/
}
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{ {
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) ); amt = new BigDecimal("0");
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptypay.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "D") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numAdd(amt , $setfog\setfol[a]\amt.getValue());
}
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptydbt.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numSub(amt , $setfog\setfol[a]\amt.getValue());
}
if( ! Platform.isEmpty( amt ) )
{
// use different codewords for debiting and paying foreign charges
if( Platform.compareTo(amt , 0)<0 )
{
sgn = "-";
// DO5CS.703597
switch( $\trnmod\trndoc\doccur\mt.getValue() )
{
case "400":
typ = sgn + "/YOURCHAR/";
break;
default:
typ = sgn + "/CORCOM/";
}
}
else
{
sgn = "+";
// DO5CS.703597
typ = sgn + "/CORCOM/";
/**
select case \TRNMOD\TRNDOC\DOCCUR\MT
case "750", "754"
$Typ = $Sgn + "/YOURCHAR/"
case else
$Typ = $Sgn + "/CORCOM/"
end select
**/
}
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) );
}
else
{
Platform.streamInsert( res, 0, typ );
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) );
Platform.streamInsert( res, 0, "CUR" + $setfog\setfol[a]\cur.getValue() );
entCnt = entCnt + 1;
}
}
} }
else // if too many lines, restart with less details
/**
if $EntCnt > ArgLinnum then
**/
if( entCnt > 6 )
{ {
Platform.streamInsert( res, 0, typ ); if( ! allMisc )
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) ); {
Platform.streamInsert( res, 0, "CUR" + $setfog\setfol[a]\cur.getValue() ); allMisc = true;
entCnt = entCnt + 1; //return ""; // #######TODO 改写 LABEL与GOTO #### goto Restart
continue Restart;
}
else
{
// if too many lines, even if only using misc, do not print tag
if(1==1) return "";
}
} }
} break;
}
// if too many lines, restart with less details
/**
if $EntCnt > ArgLinnum then
**/
if( entCnt > 6 )
{
if( ! allMisc )
{
allMisc = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
}
else
{
// if too many lines, even if only using misc, do not print tag
if(1==1) return;
}
} }
// print tag // print tag
String erg = ""; String erg = "";
int stmCnt = Platform.streamCount( res ); int stmCnt = Platform.streamCount( res );
...@@ -188,12 +206,12 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in ...@@ -188,12 +206,12 @@ String printSwiftFees(String rol,String tag,String argdirflg,String argdspflg,in
cur = Platform.mid( lin, 4, 3 ); cur = Platform.mid( lin, 4, 3 );
if( sum > 0 || sum == 0 ) if( sum > 0 || sum == 0 )
{ {
Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( sum, cur )); Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(sum), cur ));
} }
else else
{ {
// negative amounts has to be marked with `credit` // negative amounts has to be marked with `credit`
Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( Platform.abs( sum ), cur ) + " credit "); Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( sum )), cur ) + " credit ");
} }
totAmt = totAmt + sum; totAmt = totAmt + sum;
if( Platform.compareTo(cur, totCur) != 0 ) if( Platform.compareTo(cur, totCur) != 0 )
......
...@@ -28,7 +28,7 @@ void checkSep() ...@@ -28,7 +28,7 @@ void checkSep()
} }
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 ) if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{ {
if( Platform.prompt( #CT000372, $sep\objref.getValue(), ownRef ) == tdPromptNo ) if( Platform.prompt( #CT000372, $sep\objref.getValue(), ownRef ) == Platform.intConvertBoolean(tdPromptNo) )
{ {
errTxt = Platform.getText( #CT000373 ); errTxt = Platform.getText( #CT000373 );
$\trnmod.trnmodCancel( errTxt, TrnmodCancelExitWithoutPrompt ); $\trnmod.trnmodCancel( errTxt, TrnmodCancelExitWithoutPrompt );
...@@ -83,7 +83,7 @@ void checkSep() ...@@ -83,7 +83,7 @@ void checkSep()
// if not unique ask if user wants to exit // if not unique ask if user wants to exit
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 ) if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{ {
if( Platform.prompt( #CT000362 ) == tdPromptYes ) if( Platform.prompt( #CT000362 ) == Platform.intConvertBoolean(tdPromptYes) )
{ {
errTxt = Platform.getText( #CT000363 ); errTxt = Platform.getText( #CT000363 );
$\trnmod.trnmodCancel( errTxt, TrnmodCancelExitWithoutPrompt ); $\trnmod.trnmodCancel( errTxt, TrnmodCancelExitWithoutPrompt );
...@@ -105,7 +105,7 @@ void checkSep() ...@@ -105,7 +105,7 @@ void checkSep()
{ {
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 ) if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{ {
if( Platform.prompt( #CT000365, Platform.fmtDateShort( $sep\srcdat.getValue() ) ) == tdPromptYes ) if( Platform.prompt( #CT000365, Platform.fmtDateShort( $sep\srcdat.getValue() ) ) == Platform.intConvertBoolean(tdPromptYes) )
{ {
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, Platform.getText( #CT000366, Platform.fmtDateShort( $sep\srcdat.getValue() ) ), "SETMODSEPWRN" ); $\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, Platform.getText( #CT000366, Platform.fmtDateShort( $sep\srcdat.getValue() ) ), "SETMODSEPWRN" );
} }
......
...@@ -28,122 +28,127 @@ String printSwiftFolFees(String rol,String tag,String argdirflg,String argdspflg ...@@ -28,122 +28,127 @@ String printSwiftFolFees(String rol,String tag,String argdirflg,String argdspflg
boolean allMisc = false; boolean allMisc = false;
String wrnBlkNegAmt = ""; String wrnBlkNegAmt = "";
// #######TODO 改写 LABEL与GOTO #### label Restart // #######TODO 改写 LABEL与GOTO #### label Restart
int entCnt = 0;
IStream res = new StreamImpl(); Restart:
Platform.streamClear( res ); while (true){
int totAmt = 0; int entCnt = 0;
String totCur = ""; IStream res = new StreamImpl();
int curCnt = 0; Platform.streamClear( res );
// scan grid of foreign charges int totAmt = 0;
int gridcnt = Platform.gridCount( $setfog\setfol ); String totCur = "";
BigDecimal amt = null; int curCnt = 0;
String typ = NULLSTR; // scan grid of foreign charges
int idx = 0; int gridcnt = Platform.gridCount( $setfog\setfol );
for(int a = 1;a <= gridcnt;a++) BigDecimal amt = null;
{ String typ = NULLSTR;
amt = new BigDecimal("0"); int idx = 0;
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptypay.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "D") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) ) for(int a = 1;a <= gridcnt;a++)
{
amt = Platform.numAdd(amt , $setfog\setfol[a]\amt.getValue());
}
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptydbt.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numSub(amt , $setfog\setfol[a]\amt.getValue());
}
if( ! Platform.isEmpty( amt ) )
{
typ = "/CORCOM/";
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{ {
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) ); amt = new BigDecimal("0");
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptypay.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "D") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numAdd(amt , $setfog\setfol[a]\amt.getValue());
}
if( Platform.compareTo( rol , getGllRol( $setfog\setfol[a]\ptydbt.getValue() ) ) == 0 && Platform.compareTo($setfog\setfol[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 && ( Platform.compareTo( $setfog\setfol[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
amt = Platform.numSub(amt , $setfog\setfol[a]\amt.getValue());
}
if( ! Platform.isEmpty( amt ) )
{
typ = "/CORCOM/";
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{
Platform.streamInsert( res, idx + 1, Platform.toString( Platform.abs( amt ) ) );
}
else
{
Platform.streamInsert( res, 0, typ );
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) );
Platform.streamInsert( res, 0, "CUR" + $setfog\setfol[a]\cur.getValue() );
entCnt = entCnt + 1;
}
}
} }
else // if too many lines, restart with less details
if( entCnt > arglinnum )
{ {
Platform.streamInsert( res, 0, typ ); if( ! allMisc )
Platform.streamInsert( res, 0, Platform.toString( Platform.abs( amt ) ) ); {
Platform.streamInsert( res, 0, "CUR" + $setfog\setfol[a]\cur.getValue() ); allMisc = true;
entCnt = entCnt + 1; //return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
continue Restart;
}
else
{
// if too many lines, even if only using misc, do not print tag
if(1==1) return "";
}
} }
} // print tag
} String erg = "";
// if too many lines, restart with less details int stmCnt = Platform.streamCount( res );
if( entCnt > arglinnum ) int sum = 0;
{ String lin = NULLSTR;
if( ! allMisc ) String cur = NULLSTR;
{ String wrnTxt = NULLSTR;
allMisc = true; if( stmCnt > 0 )
return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
}
else
{
// if too many lines, even if only using misc, do not print tag
if(1==1) return;
}
}
// print tag
String erg = "";
int stmCnt = Platform.streamCount( res );
int sum = 0;
String lin = NULLSTR;
String cur = NULLSTR;
String wrnTxt = NULLSTR;
if( stmCnt > 0 )
{
Platform.printTemp( ":" + tag + ":" );
sum = 0;
typ = "";
for(int i = 1;i <= stmCnt;i++)
{
lin = Platform.getLine( res, i );
if( Platform.compareTo( typ , "" ) == 0 )
{ {
typ = lin; Platform.printTemp( ":" + tag + ":" );
sum = 0; sum = 0;
} typ = "";
else for(int i = 1;i <= stmCnt;i++)
{
if( Platform.compareTo( Platform.mid( lin, 1, 3 ) , "CUR" ) == 0 )
{ {
// this print includes the CrLf lin = Platform.getLine( res, i );
cur = Platform.mid( lin, 4, 3 ); if( Platform.compareTo( typ , "" ) == 0 )
// negative amount with (Abs) to invoid SYSDUMP, warning is set
Platform.printTemp( typ , cur , $\trnmod.fmtAmountSwift( Platform.abs( sum ), cur ));
// negative amounts with warning
if( sum < 0 )
{ {
wrnTxt = ""; typ = lin;
wrnTxt = Platform.formatText( "$1 $2 -$3", getTxtWrnNegAmt(), cur, $\trnmod.fmtAmountSwift( Platform.abs( sum ), cur ) ); sum = 0;
wrnBlkNegAmt = $\trnmod\trndoc.xmlGetTxtSepTxt( wrnBlkNegAmt, "\r\n", wrnTxt );
} }
totAmt = totAmt + sum; else
if( Platform.compareTo(cur, totCur) != 0 )
{ {
totCur = cur; if( Platform.compareTo( Platform.mid( lin, 1, 3 ) , "CUR" ) == 0 )
curCnt = curCnt + 1; {
// this print includes the CrLf
cur = Platform.mid( lin, 4, 3 );
// negative amount with (Abs) to invoid SYSDUMP, warning is set
Platform.printTemp( typ , cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( sum )), cur ));
// negative amounts with warning
if( sum < 0 )
{
wrnTxt = "";
wrnTxt = Platform.formatText( "$1 $2 -$3", getTxtWrnNegAmt(), cur, $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( sum )), cur ) );
wrnBlkNegAmt = $\trnmod\trndoc.xmlGetTxtSepTxt( wrnBlkNegAmt, "\r\n", wrnTxt );
}
totAmt = totAmt + sum;
if( Platform.compareTo(cur, totCur) != 0 )
{
totCur = cur;
curCnt = curCnt + 1;
}
typ = "";
}
else
{
sum = sum + Platform.parseInt( lin );
}
} }
typ = "";
}
else
{
sum = sum + Platform.parseInt( lin );
} }
} }
} // set/ clear warnings
} $\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, wrnBlkNegAmt, "SETMODFOLFEEWRN" );
// set/ clear warnings // only return amount if not more than one currency
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, wrnBlkNegAmt, "SETMODFOLFEEWRN" ); if( curCnt < 2 )
// only return amount if not more than one currency {
if( curCnt < 2 ) argtotcur.value = totCur;
{ argtotamt.value = totAmt;
argtotcur.value = totCur; }
argtotamt.value = totAmt; else
} {
else argtotcur.value = "*";
{ argtotamt.value = 0;
argtotcur.value = "*"; }
argtotamt.value = 0;
}
return Platform.releasePrintBuffer(); return Platform.releasePrintBuffer();
}
} }
\ No newline at end of file
...@@ -37,42 +37,58 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg ...@@ -37,42 +37,58 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg
int gridcnt = Platform.gridCount( $setfeg\setfel ); int gridcnt = Platform.gridCount( $setfeg\setfel );
String typ = NULLSTR; String typ = NULLSTR;
int idx = 0; int idx = 0;
for(int a = 1;a <= gridcnt;a++)
{ Restart:
if( Platform.compareTo( rol , getGllRol( $setfeg\setfel[a]\rol.getValue() ) ) == 0 && ( ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 ) || ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)<0 && Platform.compareTo(argdirflg, "D") != 0 ) ) && ( Platform.compareTo( $setfeg\setfel[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) ) while(true){
{ entCnt = 0;
typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feesftcod.getValue(), "FEESFT", UilSwift ); res = new StreamImpl();
if( Platform.isEmpty( typ ) || allMisc ) Platform.streamClear( res );
totAmt = 0;
totCur = "";
curCnt = 0;
// scan grid of own fees
gridcnt = Platform.gridCount( $setfeg\setfel );
typ = null;
idx = 0;
for(int a = 1;a <= gridcnt;a++)
{ {
typ = "/MISC/"; if( Platform.compareTo( rol , getGllRol( $setfeg\setfel[a]\rol.getValue() ) ) == 0 && ( ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)>0 && Platform.compareTo(argdirflg, "C") != 0 ) || ( Platform.compareTo($setfeg\setfel[a]\amt.getValue() , 0)<0 && Platform.compareTo(argdirflg, "D") != 0 ) ) && ( Platform.compareTo( $setfeg\setfel[a]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) )
{
typ = Platform.getCodetableLabelOfTd( $setfeg\setfel[a]\feesftcod.getValue(), "FEESFT", UilSwift );
if( Platform.isEmpty( typ ) || allMisc )
{
typ = "/MISC/";
}
idx = Platform.streamSearch( res, typ );
if( idx > 0 )
{
Platform.streamInsert( res, idx + 1, Platform.toString( $setfeg\setfel[a]\amt.getValue() ) );
}
else
{
Platform.streamInsert( res, 0, typ );
Platform.streamInsert( res, 0, Platform.toString( $setfeg\setfel[a]\amt.getValue() ) );
Platform.streamInsert( res, 0, "CUR" + $setfeg\setfel[a]\cur.getValue() );
entCnt = entCnt + 1;
}
}
} }
idx = Platform.streamSearch( res, typ ); // if too many lines, restart with less details
if( idx > 0 ) if( entCnt > arglinnum )
{ {
Platform.streamInsert( res, idx + 1, Platform.toString( $setfeg\setfel[a]\amt.getValue() ) ); if( ! allMisc )
} {
else allMisc = true;
{ //return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
Platform.streamInsert( res, 0, typ ); continue Restart;
Platform.streamInsert( res, 0, Platform.toString( $setfeg\setfel[a]\amt.getValue() ) ); }
Platform.streamInsert( res, 0, "CUR" + $setfeg\setfel[a]\cur.getValue() ); else
entCnt = entCnt + 1; {
// if too many lines, even if only using misc, do not print tag
if(1==1) return "";
}
} }
} break;
}
// if too many lines, restart with less details
if( entCnt > arglinnum )
{
if( ! allMisc )
{
allMisc = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
}
else
{
// if too many lines, even if only using misc, do not print tag
if(1==1) return;
}
} }
// print tag // print tag
String erg = ""; String erg = "";
...@@ -101,12 +117,12 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg ...@@ -101,12 +117,12 @@ String printSwiftFelFees(String rol,String tag,String argdirflg,String argdspflg
cur = Platform.mid( lin, 4, 3 ); cur = Platform.mid( lin, 4, 3 );
if( sum > 0 || sum == 0 ) if( sum > 0 || sum == 0 )
{ {
Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( sum, cur )); Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(sum), cur ));
} }
else else
{ {
// negative amounts has to be marked with `credit` // negative amounts has to be marked with `credit`
Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( Platform.abs( sum ), cur ) + " credit "); Platform.printTemp( typ + cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( sum )), cur ) + " credit ");
} }
totAmt = totAmt + sum; totAmt = totAmt + sum;
if( Platform.compareTo(cur, totCur) != 0 ) if( Platform.compareTo(cur, totCur) != 0 )
......
...@@ -19,7 +19,7 @@ String printSwiftDoccurAmount(String argdsp,String argrol,String argtag) ...@@ -19,7 +19,7 @@ String printSwiftDoccurAmount(String argdsp,String argrol,String argtag)
// if wrong currency, stop immediately // if wrong currency, stop immediately
if( Platform.compareTo($setglg\setgll[d]\cur.getValue(), $doccur.getValue()) != 0 ) if( Platform.compareTo($setglg\setgll[d]\cur.getValue(), $doccur.getValue()) != 0 )
{ {
if(1==1) return; if(1==1) return "";
} }
// add amont // add amont
amtSum = Platform.numAdd(amtSum , $setglg\setgll[d]\amt.getValue()); amtSum = Platform.numAdd(amtSum , $setglg\setgll[d]\amt.getValue());
......
...@@ -23,97 +23,101 @@ String dtaGetFeesOwn(String argrol,String argdirflg,String argdspflg,int arglinn ...@@ -23,97 +23,101 @@ String dtaGetFeesOwn(String argrol,String argdirflg,String argdspflg,int arglinn
} }
boolean allMisc = false; boolean allMisc = false;
// #######TODO 改写 LABEL与GOTO #### label Restart // #######TODO 改写 LABEL与GOTO #### label Restart
IStream res = new StreamImpl(); RestartLabel:
Platform.streamClear( res ); while(true){
int totAmt = 0; IStream res = new StreamImpl();
String totCur = ""; Platform.streamClear( res );
int curCnt = 0; int totAmt = 0;
// scan grid of own fees String totCur = "";
int gridcnt = Platform.gridCount( $setfeg\setfel ); int curCnt = 0;
BigDecimal amt = null; // scan grid of own fees
String cod = NULLSTR; int gridcnt = Platform.gridCount( $setfeg\setfel );
String cur = NULLSTR; BigDecimal amt = null;
int fnd = 0; String cod = NULLSTR;
String oldAmt = NULLSTR; String cur = NULLSTR;
int tab = 0; int fnd = 0;
for(int i = 1;i <= gridcnt;i++) String oldAmt = NULLSTR;
{ int tab = 0;
if( Platform.compareTo( argrol , getGllRol( $setfeg\setfel[i]\rol.getValue() ) ) == 0 ) for(int i = 1;i <= gridcnt;i++)
{
amt = $setfeg\setfel[i]\amt;
if( Platform.compareTo(amt, 0) != 0 )
{ {
if( Platform.compareTo( $setfeg\setfel[i]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) ) if( Platform.compareTo( argrol , getGllRol( $setfeg\setfel[i]\rol.getValue() ) ) == 0 )
{ {
cod = $setfeg\setfel[i]\feedtacod; amt = $setfeg\setfel[i]\amt;
if( Platform.isEmpty( cod ) || allMisc ) if( Platform.compareTo(amt, 0) != 0 )
{ {
cod = "MISC"; if( Platform.compareTo( $setfeg\setfel[i]\dsp , chkdspflg ) == 0 || Platform.isEmpty( chkdspflg ) )
}
cur = $setfeg\setfel[i]\cur;
fnd = 0;
fnd = Platform.streamSearch( res, cod );
if( fnd > 0 )
{
oldAmt = Platform.getLine( res, fnd );
tab = Platform.pos( oldAmt, "\t" );
while( tab > 0 )
{ {
oldAmt = Platform.mid( oldAmt, tab + 1 ); cod = $setfeg\setfel[i]\feedtacod;
tab = Platform.pos( oldAmt, "\t" ); if( Platform.isEmpty( cod ) || allMisc )
{
cod = "MISC";
}
cur = $setfeg\setfel[i]\cur;
fnd = 0;
fnd = Platform.streamSearch( res, cod );
if( fnd > 0 )
{
oldAmt = Platform.getLine( res, fnd );
tab = Platform.pos( oldAmt, "\t" );
while( tab > 0 )
{
oldAmt = Platform.mid( oldAmt, tab + 1 );
tab = Platform.pos( oldAmt, "\t" );
}
amt = Platform.numAdd(Platform.parseInt( oldAmt ) , amt);
Platform.streamDelete( res, fnd );
}
Platform.streamInsert( res, fnd, cod + "\t" + cur + "\t" + Platform.toString( amt ) );
} }
amt = Platform.numAdd(Platform.parseInt( oldAmt ) , amt);
Platform.streamDelete( res, fnd );
} }
Platform.streamInsert( res, fnd, cod + "\t" + cur + "\t" + Platform.toString( amt ) );
} }
} }
} // if too many lines, restart with less details
} int stmEnd = Platform.streamCount( res );
// if too many lines, restart with less details if( stmEnd > arglinnum )
int stmEnd = Platform.streamCount( res );
if( stmEnd > arglinnum )
{
if( ! allMisc )
{
allMisc = true;
return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
}
else
{
// if too many lines, even if only using misc, do not print tag
Platform.streamClear( res );
}
}
// format fees
String stmLin = NULLSTR;
String code = NULLSTR;
String curAmt = NULLSTR;
String credit = NULLSTR;
String feeLin = NULLSTR;
if( stmEnd > 0 )
{
for(int i = 1;i <= stmEnd;i++)
{
stmLin = Platform.getLine( res, i );
tab = Platform.pos( stmLin, "\t" );
code = Platform.mid( stmLin, 1, tab - 1 );
stmLin = Platform.mid( stmLin, tab + 1 );
tab = Platform.pos( stmLin, "\t" );
cur = Platform.mid( stmLin, 1, tab - 1 );
amt = new BigDecimal(Platform.parseInt( Platform.mid( stmLin, tab + 1 ) ));
curAmt = Platform.formatText( "$1$2", cur, $\trnmod.fmtAmountSwift( Platform.abs( amt ), cur ) );
credit = "";
if( Platform.compareTo(amt , 0)<0 )
{ {
credit = " credit"; if( ! allMisc )
{
allMisc = true;
//return ; // #######TODO 改写 LABEL与GOTO #### goto Restart
continue RestartLabel;
}
else
{
// if too many lines, even if only using misc, do not print tag
Platform.streamClear( res );
}
}
// format fees
String stmLin = NULLSTR;
String code = NULLSTR;
String curAmt = NULLSTR;
String credit = NULLSTR;
String feeLin = NULLSTR;
if( stmEnd > 0 )
{
for(int i = 1;i <= stmEnd;i++)
{
stmLin = Platform.getLine( res, i );
tab = Platform.pos( stmLin, "\t" );
code = Platform.mid( stmLin, 1, tab - 1 );
stmLin = Platform.mid( stmLin, tab + 1 );
tab = Platform.pos( stmLin, "\t" );
cur = Platform.mid( stmLin, 1, tab - 1 );
amt = new BigDecimal(Platform.parseInt( Platform.mid( stmLin, tab + 1 ) ));
curAmt = Platform.formatText( "$1$2", cur, $\trnmod.fmtAmountSwift( Platform.abs( amt ), cur ) );
credit = "";
if( Platform.compareTo(amt , 0)<0 )
{
credit = " credit";
}
feeLin = Platform.formatText( "/$1/$2$3", code, curAmt, credit );
Platform.streamDelete( res, i );
Platform.streamInsert( res, i, feeLin );
}
} }
feeLin = Platform.formatText( "/$1/$2$3", code, curAmt, credit ); String blk = Platform.toString( res );
Platform.streamDelete( res, i ); return blk;
Platform.streamInsert( res, i, feeLin );
}
} }
String blk = Platform.toString( res );
return blk;
} }
\ No newline at end of file
...@@ -50,7 +50,7 @@ String swtCreateMT768(Date argmsgdat,String argrol) ...@@ -50,7 +50,7 @@ String swtCreateMT768(Date argmsgdat,String argrol)
//print ":32:" ; Amount of charges, option B or D //print ":32:" ; Amount of charges, option B or D
Platform.printTemp( $\setmod.printSwiftTotalAmountOpt( "A", argrol, "32" ) ); Platform.printTemp( $\setmod.printSwiftTotalAmountOpt( "A", argrol, "32" ) );
//print ":57:" ; Account with bank //print ":57:" ; Account with bank
if( !( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[lineNr]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[lineNr]\setgrp\awi\pts\adrblk ) ) if( ! Platform.isEmpty( $setglg\setgll[lineNr]\setgrp\awi\pts\adrblk ) )
{ {
...@@ -108,7 +108,7 @@ String swtCreateMT768(Date argmsgdat,String argrol) ...@@ -108,7 +108,7 @@ String swtCreateMT768(Date argmsgdat,String argrol)
{ {
Platform.streamInsert( tag72Stm, 0, tag32 ); Platform.streamInsert( tag72Stm, 0, tag32 );
} }
if( !( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[idx]\setgrp\awi\pts\adrblk ) ) if( ! Platform.isEmpty( $setglg\setgll[idx]\setgrp\awi\pts\adrblk ) )
{ {
...@@ -128,7 +128,7 @@ String swtCreateMT768(Date argmsgdat,String argrol) ...@@ -128,7 +128,7 @@ String swtCreateMT768(Date argmsgdat,String argrol)
set = true; set = true;
} }
// Account information for Tag 72 // Account information for Tag 72
if( !( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[idx]\act ) ) if( ! Platform.isEmpty( $setglg\setgll[idx]\act ) )
{ {
......
...@@ -69,14 +69,14 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri ...@@ -69,14 +69,14 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri
} }
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":32B:", cur, amt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":32B:", cur, amt ) );
//print ":33B:" ; Amount reduced or released //print ":33B:" ; Amount reduced or released
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":33B:", argcur, argamt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":33B:", argcur, BigDecimal.valueOf(argamt) ) );
//print ":34B:" ; Amount outstanding //print ":34B:" ; Amount outstanding
if( ! Platform.isEmpty( argnewcur ) && ! Platform.isEmpty( argnewamt ) ) if( ! Platform.isEmpty( argnewcur ) && ! Platform.isEmpty( argnewamt ) )
{ {
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":34B:", argnewcur, argnewamt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":34B:", argnewcur, BigDecimal.valueOf(argnewamt) ) );
} }
//print ":57:" ; Account with bank //print ":57:" ; Account with bank
if( !( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[lineNr]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[lineNr]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[lineNr]\setgrp\awi\pts\adrblk ) ) if( ! Platform.isEmpty( $setglg\setgll[lineNr]\setgrp\awi\pts\adrblk ) )
{ {
...@@ -138,12 +138,12 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri ...@@ -138,12 +138,12 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri
Platform.streamInsert( tag72Stm, 0, tag32 ); Platform.streamInsert( tag72Stm, 0, tag32 );
} }
//print ":33B:" ; Amount reduced or released //print ":33B:" ; Amount reduced or released
Platform.streamInsert( tag72Stm, 0, "33B: " + argcur + " " + $\trnmod.fmtAmountSwift( Platform.abs( argamt ), argcur ) ); Platform.streamInsert( tag72Stm, 0, "33B: " + argcur + " " + $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( argamt )), argcur ) );
if( ! Platform.isEmpty( argnewcur ) && ! Platform.isEmpty( argnewamt ) ) if( ! Platform.isEmpty( argnewcur ) && ! Platform.isEmpty( argnewamt ) )
{ {
Platform.streamInsert( tag72Stm, 0, "34B: " + argnewcur + " " + $\trnmod.fmtAmountSwift( argnewamt, argnewcur ) ); Platform.streamInsert( tag72Stm, 0, "34B: " + argnewcur + " " + $\trnmod.fmtAmountSwift( BigDecimal.valueOf(argnewamt), argnewcur ) );
} }
if( !( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[idx]\setgrp\awi\pts\adrblk ) ) if( ! Platform.isEmpty( $setglg\setgll[idx]\setgrp\awi\pts\adrblk ) )
{ {
...@@ -163,7 +163,7 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri ...@@ -163,7 +163,7 @@ String swtCreateMT769(Date argmsgdat,String argrol,String argcur,int argamt,Stri
set = true; set = true;
} }
// Account information for Tag 72 // Account information for Tag 72
if( !( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[idx]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[idx]\dsp , "HLD") != 0 )
{ {
if( ! Platform.isEmpty( $setglg\setgll[idx]\act ) ) if( ! Platform.isEmpty( $setglg\setgll[idx]\act ) )
{ {
......
...@@ -5,9 +5,9 @@ String swtPrtMt754Body(String argpayrol,Date argdate,#ptspta argrmbptspta,String ...@@ -5,9 +5,9 @@ String swtPrtMt754Body(String argpayrol,Date argdate,#ptspta argrmbptspta,String
Platform.printTemp( $\trnmod.swtCreateHeaderfun ( "754", $\trnmod\trndoc\doccur\adrbic.getValue(), "", "" ) ); Platform.printTemp( $\trnmod.swtCreateHeaderfun ( "754", $\trnmod\trndoc\doccur\adrbic.getValue(), "", "" ) );
Platform.printTemp( $\trnmod\trndoc.swtPrtReference( ":20:", "", "OWN" ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtReference( ":20:", "", "OWN" ) );
Platform.printTemp( $\trnmod\trndoc.swtPrtReference( ":21:", "", "" ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtReference( ":21:", "", "" ) );
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmountAB( ":32:", argdate, argmaxcur, argmaxamt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmountAB( ":32:", argdate, argmaxcur, BigDecimal.valueOf(argmaxamt) ) );
// Additional Amount option 33B // Additional Amount option 33B
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":33B:", argaddcur, argaddamt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":33B:", argaddcur, BigDecimal.valueOf(argaddamt) ) );
String dedCur = NULLSTR; String dedCur = NULLSTR;
BigDecimal dedAmt = null; BigDecimal dedAmt = null;
String addCur = NULLSTR; String addCur = NULLSTR;
......
...@@ -57,7 +57,7 @@ String cmnseta1() ...@@ -57,7 +57,7 @@ String cmnseta1()
// M8 - bank code or BIC/ account no. // M8 - bank code or BIC/ account no.
Platform.printTemp( dtaPrtTagM08( gllRow ) ); Platform.printTemp( dtaPrtTagM08( gllRow ) );
Platform.printTemp( $\trnmod\trndoc.swtPrtEndTag( "DTA" ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtEndTag( "DTA" ) );
Platform.printTemp( $\trnmod\trndoc\dtamod.dtaCreateTrailerAll( mt, getTagM39() )); Platform.printTemp( $\trnmod\trndoc\dtamod.dtaCreateTrailerAll( mt, BigDecimal.valueOf(getTagM39()) ));
return Platform.releasePrintBuffer(); return Platform.releasePrintBuffer();
} }
\ No newline at end of file
...@@ -85,7 +85,7 @@ void bolItemisedBankCharging_FOG(String argrolepayee,String argrolepayer,IStream ...@@ -85,7 +85,7 @@ void bolItemisedBankCharging_FOG(String argrolepayee,String argrolepayer,IStream
$\trnmod\bolmod.bolMappedContent_OtherType( "bankChargePaymentParty", argrolepayer, "", "ROLALL", "X", 3 ); $\trnmod\bolmod.bolMappedContent_OtherType( "bankChargePaymentParty", argrolepayer, "", "ROLALL", "X", 3 );
} }
lastrol = ptypay; lastrol = ptypay;
bolItemisedBankCharge( $\trnmod\trndoc\doccur\role.getValue(), txtdbt, amt, cur, dsp ); bolItemisedBankCharge( $\trnmod\trndoc\doccur\role.getValue(), txtdbt, BigDecimal.valueOf(amt), cur, dsp );
if( i == stmcnt ) if( i == stmcnt )
{ {
Platform.printTemp( " </ItemisedBankCharging>"); Platform.printTemp( " </ItemisedBankCharging>");
......
...@@ -23,7 +23,7 @@ String bolmod494() ...@@ -23,7 +23,7 @@ String bolmod494()
Platform.printTemp( "<DocumentaryCreditChargeAdviceParticulars>"); Platform.printTemp( "<DocumentaryCreditChargeAdviceParticulars>");
// Foreign Charges // Foreign Charges
String forCur = ""; String forCur = "";
int forAmt = 0; BigDecimal forAmt = BigDecimal.ZERO;
Argument<String> forCurBox = new Argument<String>("",forCur); Argument<String> forCurBox = new Argument<String>("",forCur);
Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt); Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt);
$\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox ); $\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox );
...@@ -31,7 +31,7 @@ String bolmod494() ...@@ -31,7 +31,7 @@ String bolmod494()
forCur = forCurBox.value; forCur = forCurBox.value;
forAmt = forAmtBox.value; forAmt = forAmtBox.value;
if( forAmt > 0 ) if( forAmt.compareTo(BigDecimal.ZERO) > 0 )
{ {
$\trnmod\bolmod.bolAmountTag( "ForeignBankChargeAmount", forCur, forAmt ); $\trnmod\bolmod.bolAmountTag( "ForeignBankChargeAmount", forCur, forAmt );
} }
......
...@@ -2,7 +2,7 @@ void bolPrtAmountsin417() ...@@ -2,7 +2,7 @@ void bolPrtAmountsin417()
{ {
// Foreign Charges // Foreign Charges
String forCur = ""; String forCur = "";
int forAmt = 0; BigDecimal forAmt = BigDecimal.ZERO;
Argument<String> forCurBox = new Argument<String>("",forCur); Argument<String> forCurBox = new Argument<String>("",forCur);
Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt); Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt);
$\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox ); $\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox );
...@@ -10,7 +10,7 @@ void bolPrtAmountsin417() ...@@ -10,7 +10,7 @@ void bolPrtAmountsin417()
forCur = forCurBox.value; forCur = forCurBox.value;
forAmt = forAmtBox.value; forAmt = forAmtBox.value;
if( forAmt > 0 ) if( forAmt.compareTo(BigDecimal.ZERO) > 0 )
{ {
$\trnmod\bolmod.bolAmountTag( "ForeignBankChargeAmount", forCur, forAmt ); $\trnmod\bolmod.bolAmountTag( "ForeignBankChargeAmount", forCur, forAmt );
} }
...@@ -86,7 +86,7 @@ void bolPrtAmountsin417() ...@@ -86,7 +86,7 @@ void bolPrtAmountsin417()
} }
// Exchange Rate // Exchange Rate
BigDecimal rate = null; BigDecimal rate = null;
int absAmt = 0; BigDecimal absAmt = BigDecimal.ZERO;
String dectxt = NULLSTR; String dectxt = NULLSTR;
String amount = NULLSTR; String amount = NULLSTR;
if( gllRow > 0 ) if( gllRow > 0 )
...@@ -95,7 +95,7 @@ void bolPrtAmountsin417() ...@@ -95,7 +95,7 @@ void bolPrtAmountsin417()
if( Platform.compareTo(rate, 1) != 0 ) if( Platform.compareTo(rate, 1) != 0 )
{ {
absAmt = Platform.abs( rate ); absAmt = Platform.abs( rate );
dectxt = Platform.fmtAmount( absAmt - Platform.floor( absAmt ), xrfCur, "EN" ); dectxt = Platform.fmtAmount( Platform.numSub(absAmt, Platform.floor( absAmt )), xrfCur, "EN" );
dectxt = Platform.mid( dectxt, 3, Platform.len( dectxt ) - 2 ); dectxt = Platform.mid( dectxt, 3, Platform.len( dectxt ) - 2 );
amount = Platform.toString( Platform.floor( absAmt ) ) + "." + dectxt; amount = Platform.toString( Platform.floor( absAmt ) ) + "." + dectxt;
$\trnmod\bolmod.bolTextTag( "exchangeRate", amount ); $\trnmod\bolmod.bolTextTag( "exchangeRate", amount );
......
...@@ -26,7 +26,7 @@ void bolPrtAmountsin416() ...@@ -26,7 +26,7 @@ void bolPrtAmountsin416()
} }
// Foreign Charges // Foreign Charges
String forCur = ""; String forCur = "";
int forAmt = 0; BigDecimal forAmt = BigDecimal.ZERO;
Argument<String> forCurBox = new Argument<String>("",forCur); Argument<String> forCurBox = new Argument<String>("",forCur);
Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt); Argument<BigDecimal> forAmtBox = new Argument<BigDecimal>("",forAmt);
$\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox ); $\setmod\setfog.getCurForChgRolbyDsp ( $\trnmod\trndoc\doccur\role.getValue(), "X", forCurBox, forAmtBox );
...@@ -34,7 +34,7 @@ void bolPrtAmountsin416() ...@@ -34,7 +34,7 @@ void bolPrtAmountsin416()
forCur = forCurBox.value; forCur = forCurBox.value;
forAmt = forAmtBox.value; forAmt = forAmtBox.value;
if( forAmt > 0 ) if( forAmt.compareTo(BigDecimal.ZERO) > 0 )
{ {
if( ! done ) if( ! done )
{ {
......
...@@ -38,7 +38,7 @@ void assertAtcEntriesForFee() ...@@ -38,7 +38,7 @@ void assertAtcEntriesForFee()
if( last == false ) if( last == false )
{ {
$\setmod\setfeg.addTrnFee ( "TRNATC" + feetyp, feetyp, feeflg, feeunt, from, till, 0, 0, "", "" ); $\setmod\setfeg.addTrnFee ( "TRNATC" + feetyp, feetyp, feeflg, feeunt, from, till, BigDecimal.ZERO, BigDecimal.ZERO, "", "" );
} }
} }
......
...@@ -88,15 +88,15 @@ void recalcSetdet() ...@@ -88,15 +88,15 @@ void recalcSetdet()
{ {
if( Platform.isEmpty( $ptydet[rolLin]\dftcur ) ) if( Platform.isEmpty( $ptydet[rolLin]\dftcur ) )
{ {
$\sysmod.disableAndClearField( $ptydet[rolLin]\dftdsp ); $\sysmod.disableAndClearField( Platform.getDatafield($ptydet[rolLin],"dftdsp") );
$\sysmod.disableAndClearField( $ptydet[rolLin]\dftact ); $\sysmod.disableAndClearField( Platform.getDatafield($ptydet[rolLin],"dftact") );
} }
else else
{ {
// set available dispocodes // set available dispocodes
Platform.enable( $ptydet[rolLin]\dftdsp ); Platform.enable( $ptydet[rolLin]\dftdsp );
Platform.streamSet( dspLst, $\setmod.getDsp( $ptydet[rolLin]\rol.getValue(), $ptydet[rolLin]\dftcur.getValue(), 0, "", 0, $ptydet[rolLin]\ptyinr.getValue(), $ptydet[rolLin]\ptainr.getValue() ) ); Platform.streamSet( dspLst, $\setmod.getDsp( $ptydet[rolLin]\rol.getValue(), $ptydet[rolLin]\dftcur.getValue(), BigDecimal.ZERO, "", 0, $ptydet[rolLin]\ptyinr.getValue(), $ptydet[rolLin]\ptainr.getValue() ) );
Platform.streamSet( dspLst2, $\setmod.getDsp( $ptydet[rolLin]\rol.getValue(), $ptydet[rolLin]\dftcur.getValue(), 1, "", 0, $ptydet[rolLin]\ptyinr.getValue(), $ptydet[rolLin]\ptainr.getValue() ) ); Platform.streamSet( dspLst2, $\setmod.getDsp( $ptydet[rolLin]\rol.getValue(), $ptydet[rolLin]\dftcur.getValue(), BigDecimal.ONE, "", 0, $ptydet[rolLin]\ptyinr.getValue(), $ptydet[rolLin]\ptainr.getValue() ) );
Platform.streamInsert( dspLst, 0, dspLst2 ); Platform.streamInsert( dspLst, 0, dspLst2 );
if( Platform.streamCount( dspLst ) > 0 ) if( Platform.streamCount( dspLst ) > 0 )
{ {
...@@ -149,9 +149,9 @@ void recalcSetdet() ...@@ -149,9 +149,9 @@ void recalcSetdet()
$actlst = ACTGetComBlk( PTYDET( $RolLin )\DFTdsp, PTYDET( $RolLin )\DFTdsp, PTYDET( $RolLin )\DFTCUR, self ) $actlst = ACTGetComBlk( PTYDET( $RolLin )\DFTdsp, PTYDET( $RolLin )\DFTdsp, PTYDET( $RolLin )\DFTCUR, self )
endif endif
**/ **/
actlst = $glemod.getAvailAcc ( $ptydet[rolLin]\dftdsp.getValue(), $ptydet[rolLin]\dftcur.getValue(), $ptydet[rolLin]\ptyinr.getValue(), this, 1 ); actlst = $glemod.getAvailAcc ( $ptydet[rolLin]\dftdsp.getValue(), $ptydet[rolLin]\dftcur.getValue(), $ptydet[rolLin]\ptyinr.getValue(), this, BigDecimal.ONE );
Platform.setFieldValue( $ptydet[rolLin]\dftact, actlst ); Platform.setFieldValue( $ptydet[rolLin]\dftact, actlst );
$\trnmod.actSetCodeValues( $ptydet[rolLin]\dftact ); $\trnmod.actSetCodeValues( Platform.getDatafield($ptydet[rolLin]\dftact) );
// Check if selected account is in list and default if necessary // Check if selected account is in list and default if necessary
Platform.streamSet( actstm, actlst ); Platform.streamSet( actstm, actlst );
if( Platform.streamSearch( actstm, $ptydet[rolLin]\dftact ) == 0 ) if( Platform.streamSearch( actstm, $ptydet[rolLin]\dftact ) == 0 )
......
...@@ -7,7 +7,7 @@ String swtPrtSettlement(String rol) ...@@ -7,7 +7,7 @@ String swtPrtSettlement(String rol)
int fnd = $setglg.getSumtabRowForRole ( rol ); int fnd = $setglg.getSumtabRowForRole ( rol );
if( Platform.isEmpty( fnd ) ) if( Platform.isEmpty( fnd ) )
{ {
if(1==1) return; if(1==1) return "";
} }
// determine the MT to be created // determine the MT to be created
String mt = NULLSTR; String mt = NULLSTR;
......
void printClaimDocAmount(String cur,int amt) void printClaimDocAmount(String cur,int amt)
{ {
Platform.printTemp( protect); //Platform.printTemp( protect);
$\trnmod\trndoc.printDocAmount( cur, amt ); $\trnmod\trndoc.printDocAmount( cur, amt );
$\trnmod\trndoc.xmlPrtEmptyLine( 1 ); $\trnmod\trndoc.xmlPrtEmptyLine( 1 );
Platform.printTemp( Platform.protect ( false )); //Platform.printTemp( Platform.protect ( false ));
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ void printDetailledSettlement(String rol) ...@@ -19,7 +19,7 @@ void printDetailledSettlement(String rol)
// get settled amount to be shown i.e. all amounts except amounts booked to internal financed accounts // get settled amount to be shown i.e. all amounts except amounts booked to internal financed accounts
BigDecimal setamt = $setglg.getSetAmtSysByRolTypDsp ( rol, "", "" ); BigDecimal setamt = $setglg.getSetAmtSysByRolTypDsp ( rol, "", "" );
setamt = Platform.numSub(setamt , $setglg.getSetAmtSysByRolTypDsp ( rol, "", "FNC,FND,HLD" )); setamt = Platform.numSub(setamt , $setglg.getSetAmtSysByRolTypDsp ( rol, "", "FNC,FND,HLD" ));
Platform.printTemp( protect); //Platform.printTemp( protect);
//header //header
if( Platform.pos( $dspflg.getValue(), "G" ) == 0 ) if( Platform.pos( $dspflg.getValue(), "G" ) == 0 )
{ {
...@@ -76,7 +76,7 @@ void printDetailledSettlement(String rol) ...@@ -76,7 +76,7 @@ void printDetailledSettlement(String rol)
{ {
if( curstmidx > 1 ) if( curstmidx > 1 )
{ {
Platform.printTemp( protect); //Platform.printTemp( protect);
} }
doccur = Platform.getLine( curstm, curstmidx ); doccur = Platform.getLine( curstm, curstmidx );
// initialization // initialization
...@@ -84,7 +84,7 @@ void printDetailledSettlement(String rol) ...@@ -84,7 +84,7 @@ void printDetailledSettlement(String rol)
$prtdetamt = new BigDecimal("0"); $prtdetamt = new BigDecimal("0");
setamt = new BigDecimal("0"); setamt = new BigDecimal("0");
gridcnt = Platform.gridCount( $setglg\setgll ); gridcnt = Platform.gridCount( $setglg\setgll );
for(int i = 1;i <= gridcnt;i++) for(i = 1;i <= gridcnt;i++)
{ {
if( Platform.compareTo( $setglg\setgll[i]\rol , rol ) == 0 && Platform.compareTo( $setglg\setgll[i]\cur , doccur ) == 0 ) if( Platform.compareTo( $setglg\setgll[i]\rol , rol ) == 0 && Platform.compareTo( $setglg\setgll[i]\cur , doccur ) == 0 )
{ {
...@@ -111,7 +111,7 @@ void printDetailledSettlement(String rol) ...@@ -111,7 +111,7 @@ void printDetailledSettlement(String rol)
Platform.streamInsert( $setglg\setglgamtcon.getValue(), 1, line ); Platform.streamInsert( $setglg\setglgamtcon.getValue(), 1, line );
fnd = Platform.streamSearch( $setglg\setglgamtcon, "TRN", fnd + 1 ); fnd = Platform.streamSearch( $setglg\setglgamtcon, "TRN", fnd + 1 );
} }
for(int i = 1;i <= Platform.streamCount( $setglg\setglgamtcon.getValue() );i++) for(i = 1;i <= Platform.streamCount( $setglg\setglgamtcon.getValue() );i++)
{ {
line = Platform.getLine( $setglg\setglgamtcon.getValue(), i ); line = Platform.getLine( $setglg\setglgamtcon.getValue(), i );
tabpos = Platform.pos( line, "\t" ); tabpos = Platform.pos( line, "\t" );
...@@ -158,7 +158,7 @@ void printDetailledSettlement(String rol) ...@@ -158,7 +158,7 @@ void printDetailledSettlement(String rol)
} }
// print foreign charges (ABB03) // print foreign charges (ABB03)
gridcnt = Platform.gridCount( $setfog\setfol ); gridcnt = Platform.gridCount( $setfog\setfol );
for(int i = 1;i <= gridcnt;i++) for(i = 1;i <= gridcnt;i++)
{ {
if( Platform.compareTo( $setfog\setfol[i]\cur , doccur ) == 0 && ( Platform.compareTo($setfog\setfol[i]\dsp, "X" )== 0 || Platform.compareTo($setfog\setfol[i]\dsp, "S" )== 0 ) ) if( Platform.compareTo( $setfog\setfol[i]\cur , doccur ) == 0 && ( Platform.compareTo($setfog\setfol[i]\dsp, "X" )== 0 || Platform.compareTo($setfog\setfol[i]\dsp, "S" )== 0 ) )
{ {
...@@ -176,7 +176,7 @@ void printDetailledSettlement(String rol) ...@@ -176,7 +176,7 @@ void printDetailledSettlement(String rol)
Platform.streamClear( enostm ); Platform.streamClear( enostm );
Platform.streamSort( enostm, true ); Platform.streamSort( enostm, true );
gridcnt = Platform.gridCount( $setfeg\setfel ); gridcnt = Platform.gridCount( $setfeg\setfel );
for(int i = 1;i <= gridcnt;i++) for(i = 1;i <= gridcnt;i++)
{ {
Platform.cacheDbReadSql( $setfeg\wrkfee, Platform.sdbEtyGenSql( $setfeg\wrkfee, "where COD = " + Platform.sqlLit( $setfeg\setfel[i]\feecod.getValue() ) ) ); Platform.cacheDbReadSql( $setfeg\wrkfee, Platform.sdbEtyGenSql( $setfeg\wrkfee, "where COD = " + Platform.sqlLit( $setfeg\setfel[i]\feecod.getValue() ) ) );
if( Platform.errorCode() <= 0 ) if( Platform.errorCode() <= 0 )
......
...@@ -124,7 +124,7 @@ void printAdvisedFees(String rol,Argument<Boolean> firstfee) ...@@ -124,7 +124,7 @@ void printAdvisedFees(String rol,Argument<Boolean> firstfee)
Platform.printTempUsing( "setmod.advnow"); Platform.printTempUsing( "setmod.advnow");
first = false; first = false;
} }
printDETSETTAB( feetxt, "", oldCur, $\trnmod\trndoc.xmlFmtAmount( oldamt, oldCur ) ); printDETSETTAB( feetxt, "", oldCur, $\trnmod\trndoc.xmlFmtAmount( BigDecimal.valueOf(oldamt), oldCur ) );
feePrinted = true; feePrinted = true;
} }
} }
......
...@@ -39,7 +39,7 @@ void printFeeDetails(int line) ...@@ -39,7 +39,7 @@ void printFeeDetails(int line)
difamt = Platform.abs( Platform.parseInt( Platform.getLine( detlin, 5 ) ) ); difamt = Platform.abs( Platform.parseInt( Platform.getLine( detlin, 5 ) ) );
oldamt = Platform.parseInt( Platform.getLine( detlin, 6 ) ); oldamt = Platform.parseInt( Platform.getLine( detlin, 6 ) );
newamt = Platform.parseInt( Platform.getLine( detlin, 7 ) ); newamt = Platform.parseInt( Platform.getLine( detlin, 7 ) );
Platform.printTempUsing( "setmod.OldSetCorrection", Platform.parseDate( Platform.getLine( detlin, 2 ) ), Platform.parseDate( Platform.getLine( detlin, 3 ) ), $\trnmod\trndoc.xmlFmtAmount( difamt, cur ), $\trnmod\trndoc.xmlFmtAmount( oldamt, cur ), $\trnmod\trndoc.xmlFmtAmount( newamt, cur ), cur); Platform.printTempUsing( "setmod.OldSetCorrection", Platform.parseDate( Platform.getLine( detlin, 2 ) ), Platform.parseDate( Platform.getLine( detlin, 3 ) ), $\trnmod\trndoc.xmlFmtAmount( BigDecimal.valueOf(difamt), cur ), $\trnmod\trndoc.xmlFmtAmount( BigDecimal.valueOf(oldamt), cur ), $\trnmod\trndoc.xmlFmtAmount( BigDecimal.valueOf(newamt), cur ), cur);
} }
break; break;
case "MINCON": case "MINCON":
...@@ -50,7 +50,7 @@ void printFeeDetails(int line) ...@@ -50,7 +50,7 @@ void printFeeDetails(int line)
{ {
cur = Platform.getLine( detlin, 4 ); cur = Platform.getLine( detlin, 4 );
amt = Platform.abs( Platform.parseInt( Platform.getLine( detlin, 5 ) ) ); amt = Platform.abs( Platform.parseInt( Platform.getLine( detlin, 5 ) ) );
curAmt = $\trnmod\trndoc.xmlFmtCurAmt( cur, amt ); curAmt = $\trnmod\trndoc.xmlFmtCurAmt( cur, BigDecimal.valueOf(amt) );
begDat = Platform.parseDate( Platform.getLine( detlin, 2 ) ); begDat = Platform.parseDate( Platform.getLine( detlin, 2 ) );
endDat = Platform.add( Platform.parseDate( Platform.getLine( detlin, 3 ) ), -1 ); endDat = Platform.add( Platform.parseDate( Platform.getLine( detlin, 3 ) ), -1 );
calFlg = $\trnmod\trndoc.xmlGetTblText( Platform.getLine( detlin, 6 ), "IRPELE:CALFLG" ); calFlg = $\trnmod\trndoc.xmlGetTblText( Platform.getLine( detlin, 6 ), "IRPELE:CALFLG" );
......
...@@ -9,7 +9,7 @@ void printSettlementZLB(String rol,String intro,String leavetext) ...@@ -9,7 +9,7 @@ void printSettlementZLB(String rol,String intro,String leavetext)
{ {
if(1==1) return; if(1==1) return;
} }
Platform.printTemp( protect); //Platform.printTemp( protect);
boolean first = true; boolean first = true;
// suggested as floating text. May be shown as table instead // suggested as floating text. May be shown as table instead
int gridcnt = Platform.gridCount( $setglg\setgll ); int gridcnt = Platform.gridCount( $setglg\setgll );
...@@ -132,6 +132,6 @@ void printSettlementZLB(String rol,String intro,String leavetext) ...@@ -132,6 +132,6 @@ void printSettlementZLB(String rol,String intro,String leavetext)
Platform.printTempUsing( "setmod.simtxt", leavetext); Platform.printTempUsing( "setmod.simtxt", leavetext);
} }
$\trnmod\trndoc.xmlPrtEmptyLine( 1 ); $\trnmod\trndoc.xmlPrtEmptyLine( 1 );
Platform.printTemp( Platform.protect ( false )); //Platform.printTemp( Platform.protect ( false ));
} }
\ No newline at end of file
...@@ -15,7 +15,7 @@ void checkSepForSpt() ...@@ -15,7 +15,7 @@ void checkSepForSpt()
Platform.clear( $sep ); Platform.clear( $sep );
if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 ) if( Platform.compareTo($\sysmod\ssn\bckgrd, "F" )== 0 )
{ {
if( Platform.prompt( #CT000422, Platform.fmtDateShort( creDat ), ownRef ) == tdPromptOK ) if( Platform.prompt( #CT000422, Platform.fmtDateShort( creDat ), ownRef ) == Platform.intConvertBoolean(tdPromptOK) )
{ {
checkSep(); checkSep();
} }
......
...@@ -5,7 +5,7 @@ String getActforTAG72(String dsp,String argrol) ...@@ -5,7 +5,7 @@ String getActforTAG72(String dsp,String argrol)
int gridcnt = Platform.gridCount( $setglg\setgll ); int gridcnt = Platform.gridCount( $setglg\setgll );
for(int i = 1;i <= gridcnt;i++) for(int i = 1;i <= gridcnt;i++)
{ {
if( !( Platform.compareTo( $setglg\setgll[i]\dsp , "DAD") ) == 0 && !( Platform.compareTo( $setglg\setgll[i]\dsp , "HLD") ) == 0 ) if( Platform.compareTo( $setglg\setgll[i]\dsp , "DAD") != 0 && Platform.compareTo( $setglg\setgll[i]\dsp , "HLD") != 0 )
{ {
if( Platform.compareTo( $setglg\setgll[i]\rol , argrol ) == 0 ) if( Platform.compareTo( $setglg\setgll[i]\rol , argrol ) == 0 )
{ {
......
...@@ -34,7 +34,7 @@ String swtPrtExtAccAdrAD(String argtag,#ptspta argptspta,String argacc) ...@@ -34,7 +34,7 @@ String swtPrtExtAccAdrAD(String argtag,#ptspta argptspta,String argacc)
//if IsEmpty( ARGPTSPTA\PTS\ADRBLK ) then //if IsEmpty( ARGPTSPTA\PTS\ADRBLK ) then
if( Platform.isEmpty( adrblk ) ) if( Platform.isEmpty( adrblk ) )
{ {
if(1==1) return; if(1==1) return "";
} }
Platform.printTemp( tag + "D:" + acclin ); Platform.printTemp( tag + "D:" + acclin );
Platform.streamSet( stm, adrblk ); Platform.streamSet( stm, adrblk );
......
...@@ -26,7 +26,7 @@ String dtePrtTagM49(int arggllrow) ...@@ -26,7 +26,7 @@ String dtePrtTagM49(int arggllrow)
} }
} }
} }
Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":M49:", cur, amt ) ); Platform.printTemp( $\trnmod\trndoc.swtPrtTagAmount( ":M49:", cur, BigDecimal.valueOf(amt) ) );
} }
return Platform.releasePrintBuffer(); return Platform.releasePrintBuffer();
......
...@@ -4,7 +4,7 @@ int getTagM43(int arggllrow) ...@@ -4,7 +4,7 @@ int getTagM43(int arggllrow)
int ret = 0; int ret = 0;
if( arggllrow > 0 ) if( arggllrow > 0 )
{ {
ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ); ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ).intValue();
} }
return ret; return ret;
......
...@@ -4,7 +4,7 @@ int getTagM49(int arggllrow) ...@@ -4,7 +4,7 @@ int getTagM49(int arggllrow)
int ret = 0; int ret = 0;
if( arggllrow > 0 ) if( arggllrow > 0 )
{ {
ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ); ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ).intValue();
} }
return ret; return ret;
......
...@@ -3,7 +3,7 @@ int getTagM35(int arggllrow) ...@@ -3,7 +3,7 @@ int getTagM35(int arggllrow)
int ret = 0; int ret = 0;
if( arggllrow > 0 ) if( arggllrow > 0 )
{ {
ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ); ret = Platform.abs( $\setmod\setglg\setgll[arggllrow]\acccpramt.getValue() ).intValue();
} }
return ret; return ret;
......
...@@ -18,6 +18,6 @@ int getTagM39() ...@@ -18,6 +18,6 @@ int getTagM39()
{ {
$\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, "", "FORFEE" ); $\trnmod\mtabut\syswrn.sysWarningSet( SYSWRNTypeWarning, "", "FORFEE" );
} }
return Platform.abs( forAmt ); return Platform.abs( forAmt ).intValue();
} }
\ No newline at end of file
...@@ -7,11 +7,11 @@ String printSwiftAmount(String tag,String cur,Date valdat,int amt) ...@@ -7,11 +7,11 @@ String printSwiftAmount(String tag,String cur,Date valdat,int amt)
{ {
//MT742电文在金额后面为点零零的时候无法发送到swift正常队列。 //MT742电文在金额后面为点零零的时候无法发送到swift正常队列。
//print ":" ; tag ; "B:" ; CUR ; Amt //print ":" ; tag ; "B:" ; CUR ; Amt
Platform.printTemp( ":" + tag + "B:" , cur , $\trnmod.fmtAmountSwift( Platform.abs( amt ), cur )); Platform.printTemp( ":" + tag + "B:" , cur , $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( amt )), cur ));
} }
else else
{ {
Platform.printTemp( ":" + tag + "A:" , valdat , cur + $\trnmod.fmtAmountSwift( Platform.abs( amt ), cur )); Platform.printTemp( ":" + tag + "A:" , valdat , cur + $\trnmod.fmtAmountSwift( BigDecimal.valueOf(Platform.abs( amt )), cur ));
} }
} }
......
...@@ -30,7 +30,7 @@ String swtPrtExtAccAdrAorWithoutLetter(String argtag,#ptspta argptspta,String ar ...@@ -30,7 +30,7 @@ String swtPrtExtAccAdrAorWithoutLetter(String argtag,#ptspta argptspta,String ar
{ {
if( Platform.isEmpty( $$argptspta\pts\adrblk ) ) if( Platform.isEmpty( $$argptspta\pts\adrblk ) )
{ {
if(1==1) return; if(1==1) return "";
} }
Platform.printTemp( tag + ":" + acclin ); Platform.printTemp( tag + ":" + acclin );
Platform.streamSet( stm, $$argptspta\pts\adrblk.getValue() ); Platform.streamSet( stm, $$argptspta\pts\adrblk.getValue() );
......
void getRatamt(Argument<String> ratcur,Argument<Integer> ratamt) void getRatamt(Argument<String> ratcur,Argument<Integer> ratamt)
{ {
ratcur.value = ""; ratcur.value = "";
ratamt.value = 0.0; ratamt.value = 0;
#setfel intStream = $setfeg\setfel; ModuleList<Setfel> intStream = $setfeg\setfel;
int cnt = Platform.gridCount( intStream ); int cnt = Platform.gridCount( intStream );
for(int i = 1;i <= cnt;i++) for(int i = 1;i <= cnt;i++)
{ {
if( Platform.compareTo( Platform.mid( $setfeg\setfel[i]\feecod.getValue(), 4, 3 ) , "INT" ) == 0 && Platform.compareTo($setfeg\setfel[i]\dsp, "X" )== 0 && Platform.compareTo($setfeg\setfel[i]\amt.getValue(), 0) != 0 ) if( Platform.compareTo( Platform.mid( $setfeg\setfel[i]\feecod.getValue(), 4, 3 ) , "INT" ) == 0 && Platform.compareTo($setfeg\setfel[i]\dsp, "X" )== 0 && Platform.compareTo($setfeg\setfel[i]\amt.getValue(), 0) != 0 )
{ {
ratcur.value = $setfeg\setfel[i]\cur; ratcur.value = $setfeg\setfel[i]\cur;
ratamt.value = $setfeg\setfel[i]\amt; ratamt.value = $setfeg\setfel[i]\amt.intValue();
} }
} }
......
void getACTInformation_set() void getACTInformation_set()
{ {
//获取账号信息 //获取账号信息
java.lang.String field = GetFocusField; //java.lang.String field = GetFocusField;
IStream docMods = new StreamImpl(); IStream docMods = new StreamImpl();
Platform.streamClear( docMods ); Platform.streamClear( docMods );
String ins = NULLSTR; String ins = NULLSTR;
......
...@@ -17,7 +17,7 @@ event onPanelShow $tcollt order 100 ...@@ -17,7 +17,7 @@ event onPanelShow $tcollt order 100
} }
else else
{ {
if( $tcodoc\sztyp = "2" ) if( "2".equals($tcodoc\sztyp) )
{ {
Platform.prtLine12( "汇款种类 : ", "境内" ); Platform.prtLine12( "汇款种类 : ", "境内" );
} }
......
...@@ -15,7 +15,7 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t ...@@ -15,7 +15,7 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
bop = bopBox.value; bop = bopBox.value;
/** /**
FUCMOD.GetStreamFormat ( "*/ FUCMOD.GetStreamFormat ( "*\/
/", "", $FXQSTM, TAB, ";" ) /", "", $FXQSTM, TAB, ";" )
**/ **/
String creinr = $\sysmod\acg\creinr; String creinr = $\sysmod\acg\creinr;
...@@ -27,7 +27,7 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t ...@@ -27,7 +27,7 @@ void doHandle(Argument<String> rc,Argument<String> errmsg,String subnam,String t
String linechr = "//" + "" + ";"; String linechr = "//" + "" + ";";
$fucmod.getStreamFormatII ( prechr, ";", linechr, fxqstm, "\t", ";" ); $fucmod.getStreamFormatII ( prechr, ";", linechr, fxqstm, "\t", ";" );
/** /**
FUCMOD.GetStreamFormatII ( "*/ FUCMOD.GetStreamFormatII ( "*\/
/", ";", "#", $FXQSTM, TAB, ";" ) /", ";", "#", $FXQSTM, TAB, ";" )
**/ **/
if( ! Platform.isEmpty( fxqstm ) ) if( ! Platform.isEmpty( fxqstm ) )
......
...@@ -52,7 +52,7 @@ String transmitMessage() ...@@ -52,7 +52,7 @@ String transmitMessage()
reraise reraise
endif endif
= $rc**/ = $rc**/
break; // break;
default: default:
Platform.setErrorCode( 110, Platform.formatText( "Format $1 unknown for outgoing SWIFT", $fil.getValue() ) ); Platform.setErrorCode( 110, Platform.formatText( "Format $1 unknown for outgoing SWIFT", $fil.getValue() ) );
return "E"; return "E";
......
...@@ -59,13 +59,13 @@ void gridEtyLoad(IStream argstg,String argtds,IModule argrec,String argetyins,St ...@@ -59,13 +59,13 @@ void gridEtyLoad(IStream argstg,String argtds,IModule argrec,String argetyins,St
if( cnt > cntMax ) if( cnt > cntMax )
{ {
Platform.message( #CT000002, cnt ); Platform.message( #CT000002, cnt );
que = tdPromptOK; que = tdPromptOK != 0 ? true : false;
} }
else else
{ {
que = Platform.prompt( #CT000000, cnt ); que = Platform.prompt( #CT000000, cnt );
} }
if( que == tdPromptOK ) if( que == Platform.intConvertBoolean(tdPromptOK) )
{ {
Platform.setErrorCode( tdOdbcNotSelected, "Too many fitting entries found. Selection canceled." ); Platform.setErrorCode( tdOdbcNotSelected, "Too many fitting entries found. Selection canceled." );
if(1==1) return; if(1==1) return;
......
...@@ -74,7 +74,7 @@ void subpenaType(String act,String dbtcdt,String trmtyp) ...@@ -74,7 +74,7 @@ void subpenaType(String act,String dbtcdt,String trmtyp)
break; break;
case "W": case "W":
// case "X" // case "X"
if( !( Platform.compareTo( curtyp , "01") ) == 0 ) if( Platform.compareTo( curtyp , "01") != 0 )
{ {
if( Platform.compareTo( dbtcdt , "D" ) == 0 ) if( Platform.compareTo( dbtcdt , "D" ) == 0 )
{ {
......
static void getTermTypField(String trmtyp,Argument<String> act_id,Argument<String> name) static void getTermTypField_subp(String trmtyp,Argument<String> act_id,Argument<String> name)
{ {
//------------------------------------------- //-------------------------------------------
// 获取科目信息的函数 // 获取科目信息的函数
......
static void getActTypField(String tbltyp,Argument<String> nottyp,Argument<String> reptyp,Argument<String> term_id,Argument<String> term_nam,Argument<String> seqno,Argument<String> prttyp,Argument<String> nam) static void getActTypField_subp(String tbltyp,Argument<String> nottyp,Argument<String> reptyp,Argument<String> term_id,Argument<String> term_nam,Argument<String> seqno,Argument<String> prttyp,Argument<String> nam)
{ {
//------------------------------------------- //-------------------------------------------
// 获取账户信息的函数 // 获取账户信息的函数
......
...@@ -18,5 +18,5 @@ String kmcod(String km) ...@@ -18,5 +18,5 @@ String kmcod(String km)
{ {
return ""; return "";
} }
return "";
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ void svsFldTblSet2VisibleFields() ...@@ -27,7 +27,7 @@ void svsFldTblSet2VisibleFields()
for(int pnlIdx = 1;pnlIdx <= stmCnt;pnlIdx++) for(int pnlIdx = 1;pnlIdx <= stmCnt;pnlIdx++)
{ {
panel = Platform.getPanel( Platform.getLine( panelStream, pnlIdx ) ); panel = Platform.getPanel( Platform.getLine( panelStream, pnlIdx ) );
Platform.streamSet( fldStream, Platform.getPanelInfo( panel, 7 ) ); Platform.streamSet( fldStream, Platform.getPanelInfo( panel, 7+"" ) );
stmCntFld = Platform.streamCount( fldStream ); stmCntFld = Platform.streamCount( fldStream );
for(int fldIdx = 1;fldIdx <= stmCntFld;fldIdx++) for(int fldIdx = 1;fldIdx <= stmCntFld;fldIdx++)
{ {
...@@ -46,6 +46,7 @@ void svsFldTblSet2VisibleFields() ...@@ -46,6 +46,7 @@ void svsFldTblSet2VisibleFields()
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
} }
viewType = Platform.getAttribute( field, tdAttrViewtype ); viewType = Platform.getAttribute( field, tdAttrViewtype );
int tdViewTypeLabel = 0;
if( viewType == tdViewTypeLabel ) if( viewType == tdViewTypeLabel )
{ {
return ; // #######TODO 改写 LABEL与GOTO #### goto NextField return ; // #######TODO 改写 LABEL与GOTO #### goto NextField
......
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