Commit 4bbecdbc authored by manohar's avatar manohar

checkdigit for carton number generattion made proper


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91956 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4c4f264e
......@@ -13465,7 +13465,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
int ctr, curDigit = 0, chkDigit = 0, padLen = 0; // runNumber = 4967235
try
{
if (mfgCode == null || mfgCode.length() <= 0)
if (mfgCode == null || mfgCode.trim().length() <= 0)
{
mfgCode = "04";
}
......@@ -13497,9 +13497,13 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
// step 1 - multiple odd sum with 3
sumOdd = sumOdd * 3;
chkDigit = 10 - ((sumEven + sumOdd) % 10) ;
if (chkDigit > 9)
{
chkDigit = 0;
}
//System.out.println( " Integer(chkDigit).toString() [" + String.valueOf(chkDigit) +"]" );
//sscc18 =
sscc18 = inputStr + String.valueOf(chkDigit);
sscc18 = "0" + inputStr + String.valueOf(chkDigit);
System.out.println(" chkDigit [" + chkDigit + "] sumOdd [" + sumOdd + "] sumEven [" + sumEven + "] inputStr [" + inputStr + "] sscc18 [" + sscc18 +"]" );
......
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