Commit 999310e1 by 潘际乾

N-S脚本文件修改

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