InitValue:
public void initValue()
{
super();
this.DateofIndent = today();
this.IndentNumberToUnitEdit = '';
}
**********************************
Insert:
public void insert()
{
this.IndentNumberToUnit = NumberSeq::newGetNum(CustParameters::numRefDemoforNumberseqMTHTM(),true).num();
super();
}
***********************************
ModifiedField:
public void modifiedField(FieldId _fieldId)
{
InventTable inventTable;
Table1 table1loc;
super(_fieldId);
switch (_fieldId)
{
case fieldNum(Table1, QtyOLabelRecievedByunit1FromUnit6Manual):
case fieldNum(Table1, TotalLabels):
if(this.Thick && this.MTWidth && this.NoOfEngrave && this.Circumference)
this.TotalLabels = 1/((1000000/this.Thick/this.MTWidth)*1000*(this.NoOfEngrave / this.Circumference));
if(this.TotalLabels)
this.QtyOLabelRecievedByunit1FromUnit6 = this.QtyOLabelRecievedByunit1FromUnit6Manual /this.TotalLabels;
break;
case fieldNum(Table1, IndentNumberToUnitEdit):
case fieldNum(Table1, DispatchedQty):
select * from table1loc
where table1loc.IndentNumberToUnit == this.IndentNumberToUnitEdit;
this.PreviousIndentNumber = table1loc.TotalFilmJarLabels;
this.Field1 = table1loc.TotalFilmJarLabels;
this.Field2 = table1loc.QtyOLabelRecievedByunit1FromUnit6;
this.Field3 = table1loc.Qty;
// this.BalStockToBeAvailableBeforeRaisingIndent = this.PreviousIndentNumber + this.QtyOLabelRecievedByunit1FromUnit6 - this.Qty - this.DispatchedQty;
this.BalStockToBeAvailableBeforeRaisingIndent = this.Field1 + this.Field2 - this.Field3 -this.DispatchedQty;
break;
case fieldNum(Table1, ERPItemCodes):
inventTable = InventTable::find(this.ERPItemCodes);
this.ERPBrandName = inventTable.itemName();
this.HMTLIML = InventItemGroupItem::findByItemIdLegalEntity(inventTable.ItemId,curext()).ItemGroupId;
this.CUSTOMER = inventTable.ItemBuyerGroupId;
this.Size = inventTable.StandardInventSizeId;
this.Circumference = inventTable.Circumference;
this.MTWidth = inventTable.MTWidth;
this.Thick = inventTable.Thick;
this.NoOfEngrave = inventTable.NoOfEngrave;
this.TotalLabels = inventTable.TotalLabels;
this.PrintInputNos = inventTable.LabelMinimumPrintToRunQty;
break;
case fieldNum(Table1, CapPrintedLabelsStockatUnit1):
case fieldNum(Table1, CapPrintedLabelsStockatUnit1Roll):
case fieldNum(Table1, CapPrintedLabelsStockatUnit2):
case fieldNum(Table1, CapPrintedLabelsStockatUnit3):
case fieldNum(Table1, CapPrintedLabelsStockatUnit4):
case fieldNum(Table1, CapPrintedLabelsStockatUnit5):
case fieldNum(Table1, CapPrintedLabelsStockatUnit6):
case fieldNum(Table1, CapPrintedLabelsStockatUnit7):
/*case fieldNum(Table1, ImledPailsJarCapAtUnit1):
case fieldNum(Table1, ImledPailsJarCapAtUnit2):
case fieldNum(Table1, ImledPailsJarCapAtUnit3):
case fieldNum(Table1, ImledPailsJarCapAtUnit4):
case fieldNum(Table1, ImledPailsJarCapAtUnit5):
case fieldNum(Table1, ImledPailsJarCapAtUnit6):
case fieldNum(Table1, ImledPailsJarCapAtUnit7):
case fieldNum(Table1, Transit):
this.TotalFilmCapLabels = this.CapPrintedLabelsStockatUnit1 +
this.CapPrintedLabelsStockatUnit1Roll +
this.CapPrintedLabelsStockatUnit2 +
this.CapPrintedLabelsStockatUnit3 +
this.CapPrintedLabelsStockatUnit4 +
this.CapPrintedLabelsStockatUnit5 +
this.CapPrintedLabelsStockatUnit6 +
this.CapPrintedLabelsStockatUnit7 +
this.ImledPailsJarCapAtUnit1 +
this.ImledPailsJarCapAtUnit2 +
this.ImledPailsJarCapAtUnit3 +
this.ImledPailsJarCapAtUnit4 +
this.ImledPailsJarCapAtUnit5 +
this.ImledPailsJarCapAtUnit6 +
this.ImledPailsJarCapAtUnit7 +
this.Transit;
break;*/
case fieldNum(Table1, JarPrintedLabelStockAtUnit1):
case fieldNum(Table1, JarPrintedLabelStockAtUnit1Roll):
case fieldNum(Table1, JarPrintedLabelStockAtUnit2):
case fieldNum(Table1, JarPrintedLabelStockAtUnit3):
case fieldNum(Table1, JarPrintedLabelStockAtUnit4):
case fieldNum(Table1, JarPrintedLabelStockAtUnit5):
case fieldNum(Table1, JarPrintedLabelStockAtUnit6):
case fieldNum(Table1, JarPrintedLabelStockAtUnit7):
case fieldNum(Table1, Aug15prijectedCallupQty):
case fieldNum(Table1, Sep15prijectedCallupQty):
case fieldNum(Table1, ImledJarAtUnit1):
case fieldNum(Table1, ImledJarAtUnit2):
case fieldNum(Table1, ImledJarAtUnit3):
case fieldNum(Table1, ImledJarAtUnit4):
case fieldNum(Table1, ImledJarAtUnit5):
//case fieldNum(Table1, ImledJarAtUnit6):
case fieldNum(Table1, ImledJarAtUnit7):
case fieldNum(Table1, TransitJar):
case fieldNum(Table1, TransitCap):
case fieldNum(Table1, QtyOLabelRecievedByunit1FromUnit6):
case fieldNum(Table1, Aug15prijectedCallupQty):
case fieldNum(Table1, Sep15prijectedCallupQty):
case fieldNum(Table1, NextMonthPlusOne):
case fieldNum(Table1, Qty):
case fieldNum(Table1, ImledPailsAtG1):
case fieldNum(Table1, ImledPailsAtG2):
case fieldNum(Table1, ImledPailsAtG3):
case fieldNum(Table1, ImledPailsAtG4):
case fieldNum(Table1, PreviousIndentNumber):
Case fieldNum(Table1, AdjustedStock):
Case fieldNum(Table1,DateOfIndentSendToUnit):
Case fieldNum(Table1,QuantityOfLabelPrintedAtUnit6):
Case fieldNum(Table1,QtyOLabelRecievedByunit1FromUnit6):
this.TotalFilmJarLabels = this.JarPrintedLabelStockAtUnit1 +
this.JarPrintedLabelStockAtUnit1Roll +
this.JarPrintedLabelStockAtUnit2 +
this.JarPrintedLabelStockAtUnit3 +
this.JarPrintedLabelStockAtUnit4 +
this.JarPrintedLabelStockAtUnit5 +
this.JarPrintedLabelStockAtUnit6 +
this.JarPrintedLabelStockAtUnit7+
this.ImledJarAtUnit1 +
this.ImledJarAtUnit2 +
this.ImledJarAtUnit3 +
this.ImledJarAtUnit4 +
this.ImledJarAtUnit5 +
//this.ImledJarAtUnit1 +
this.ImledJarAtUnit7 +
this.TransitJar+
this.ImledPailsAtG1 +
this.ImledPailsAtG2 +
this.ImledPailsAtG3 +
this.ImledPailsAtG4 +
this.AdjustedStock;
this.TotalFilmCapLabels = this.CapPrintedLabelsStockatUnit1 +
this.CapPrintedLabelsStockatUnit1Roll +
this.CapPrintedLabelsStockatUnit2 +
this.CapPrintedLabelsStockatUnit3 +
this.CapPrintedLabelsStockatUnit4 +
this.CapPrintedLabelsStockatUnit5 +
this.CapPrintedLabelsStockatUnit6 +
this.CapPrintedLabelsStockatUnit7 +
// this.ImledCapAtUnit1 +
//this.ImledCapAtUnit2 +
// this.ImledCapAtUnit3 +
// this.ImledCapAtUnit4 +
this.ImledCapAtUnit5 +
//this.ImledCapAtUnit1 +
this.ImledCapAtUnit7 +
this.TransitCap;
//IndentedJarQtyToU6
this.Stock = this.QuantityOfLabelPrintedAtUnit6 - this.QtyOLabelRecievedByunit1FromUnit6;
if(this.DateOfIndentSendToUnit == Global::datenull())
{
this.IndentedJarQtyToU6 = 0;
}
else
{
this.IndentedJarQtyToU6 = max(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne + this.AdjustedProjection - this.TotalFilmJarLabels,0);
}
this.IndentedCapQtyToU6 = real2int(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne - this.TotalFilmCapLabels);
if(this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty > 0)
{
this.BalanceQtyToBeRecievedFrmUnit6againstInd = max(this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty,0); //X
this.ExcessQtyProducedAgainstIndent =0;
}
else
{
this.BalanceQtyToBeRecievedFrmUnit6againstInd =0;
this.ExcessQtyProducedAgainstIndent = (this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty);//Y
}
this.Total = real2int(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne + this.AdjustedProjection);
break;
}
}
******************************************
Find:
static public Table1 find(RecId _recId)
{
Table1 table1;
select firstonly table1
where table1.RecId == _recId;
return table1;
}
*****************************
Form Methods:
public void updateNumberSeq()
{
Table1 table1Loc;
InventSite inventSite;
select maxOf(RecId) from table1Loc
where table1Loc.ERPItemCodes == Table1.ERPItemCodes//'unit-2'
&& table1Loc.Site == Table1.Site;//'IML7.5LTRCRBMULTILAB';
Table1.IndentNumberToUnitEdit = Table1::find(table1Loc.RecId).IndentNumberToUnit;
// info(Table1::find(table1Loc.RecId).IndentNumberToUnit);
}
public void initValue()
{
super();
this.DateofIndent = today();
this.IndentNumberToUnitEdit = '';
}
**********************************
Insert:
public void insert()
{
this.IndentNumberToUnit = NumberSeq::newGetNum(CustParameters::numRefDemoforNumberseqMTHTM(),true).num();
super();
}
***********************************
ModifiedField:
public void modifiedField(FieldId _fieldId)
{
InventTable inventTable;
Table1 table1loc;
super(_fieldId);
switch (_fieldId)
{
case fieldNum(Table1, QtyOLabelRecievedByunit1FromUnit6Manual):
case fieldNum(Table1, TotalLabels):
if(this.Thick && this.MTWidth && this.NoOfEngrave && this.Circumference)
this.TotalLabels = 1/((1000000/this.Thick/this.MTWidth)*1000*(this.NoOfEngrave / this.Circumference));
if(this.TotalLabels)
this.QtyOLabelRecievedByunit1FromUnit6 = this.QtyOLabelRecievedByunit1FromUnit6Manual /this.TotalLabels;
break;
case fieldNum(Table1, IndentNumberToUnitEdit):
case fieldNum(Table1, DispatchedQty):
select * from table1loc
where table1loc.IndentNumberToUnit == this.IndentNumberToUnitEdit;
this.PreviousIndentNumber = table1loc.TotalFilmJarLabels;
this.Field1 = table1loc.TotalFilmJarLabels;
this.Field2 = table1loc.QtyOLabelRecievedByunit1FromUnit6;
this.Field3 = table1loc.Qty;
// this.BalStockToBeAvailableBeforeRaisingIndent = this.PreviousIndentNumber + this.QtyOLabelRecievedByunit1FromUnit6 - this.Qty - this.DispatchedQty;
this.BalStockToBeAvailableBeforeRaisingIndent = this.Field1 + this.Field2 - this.Field3 -this.DispatchedQty;
break;
case fieldNum(Table1, ERPItemCodes):
inventTable = InventTable::find(this.ERPItemCodes);
this.ERPBrandName = inventTable.itemName();
this.HMTLIML = InventItemGroupItem::findByItemIdLegalEntity(inventTable.ItemId,curext()).ItemGroupId;
this.CUSTOMER = inventTable.ItemBuyerGroupId;
this.Size = inventTable.StandardInventSizeId;
this.Circumference = inventTable.Circumference;
this.MTWidth = inventTable.MTWidth;
this.Thick = inventTable.Thick;
this.NoOfEngrave = inventTable.NoOfEngrave;
this.TotalLabels = inventTable.TotalLabels;
this.PrintInputNos = inventTable.LabelMinimumPrintToRunQty;
break;
case fieldNum(Table1, CapPrintedLabelsStockatUnit1):
case fieldNum(Table1, CapPrintedLabelsStockatUnit1Roll):
case fieldNum(Table1, CapPrintedLabelsStockatUnit2):
case fieldNum(Table1, CapPrintedLabelsStockatUnit3):
case fieldNum(Table1, CapPrintedLabelsStockatUnit4):
case fieldNum(Table1, CapPrintedLabelsStockatUnit5):
case fieldNum(Table1, CapPrintedLabelsStockatUnit6):
case fieldNum(Table1, CapPrintedLabelsStockatUnit7):
/*case fieldNum(Table1, ImledPailsJarCapAtUnit1):
case fieldNum(Table1, ImledPailsJarCapAtUnit2):
case fieldNum(Table1, ImledPailsJarCapAtUnit3):
case fieldNum(Table1, ImledPailsJarCapAtUnit4):
case fieldNum(Table1, ImledPailsJarCapAtUnit5):
case fieldNum(Table1, ImledPailsJarCapAtUnit6):
case fieldNum(Table1, ImledPailsJarCapAtUnit7):
case fieldNum(Table1, Transit):
this.TotalFilmCapLabels = this.CapPrintedLabelsStockatUnit1 +
this.CapPrintedLabelsStockatUnit1Roll +
this.CapPrintedLabelsStockatUnit2 +
this.CapPrintedLabelsStockatUnit3 +
this.CapPrintedLabelsStockatUnit4 +
this.CapPrintedLabelsStockatUnit5 +
this.CapPrintedLabelsStockatUnit6 +
this.CapPrintedLabelsStockatUnit7 +
this.ImledPailsJarCapAtUnit1 +
this.ImledPailsJarCapAtUnit2 +
this.ImledPailsJarCapAtUnit3 +
this.ImledPailsJarCapAtUnit4 +
this.ImledPailsJarCapAtUnit5 +
this.ImledPailsJarCapAtUnit6 +
this.ImledPailsJarCapAtUnit7 +
this.Transit;
break;*/
case fieldNum(Table1, JarPrintedLabelStockAtUnit1):
case fieldNum(Table1, JarPrintedLabelStockAtUnit1Roll):
case fieldNum(Table1, JarPrintedLabelStockAtUnit2):
case fieldNum(Table1, JarPrintedLabelStockAtUnit3):
case fieldNum(Table1, JarPrintedLabelStockAtUnit4):
case fieldNum(Table1, JarPrintedLabelStockAtUnit5):
case fieldNum(Table1, JarPrintedLabelStockAtUnit6):
case fieldNum(Table1, JarPrintedLabelStockAtUnit7):
case fieldNum(Table1, Aug15prijectedCallupQty):
case fieldNum(Table1, Sep15prijectedCallupQty):
case fieldNum(Table1, ImledJarAtUnit1):
case fieldNum(Table1, ImledJarAtUnit2):
case fieldNum(Table1, ImledJarAtUnit3):
case fieldNum(Table1, ImledJarAtUnit4):
case fieldNum(Table1, ImledJarAtUnit5):
//case fieldNum(Table1, ImledJarAtUnit6):
case fieldNum(Table1, ImledJarAtUnit7):
case fieldNum(Table1, TransitJar):
case fieldNum(Table1, TransitCap):
case fieldNum(Table1, QtyOLabelRecievedByunit1FromUnit6):
case fieldNum(Table1, Aug15prijectedCallupQty):
case fieldNum(Table1, Sep15prijectedCallupQty):
case fieldNum(Table1, NextMonthPlusOne):
case fieldNum(Table1, Qty):
case fieldNum(Table1, ImledPailsAtG1):
case fieldNum(Table1, ImledPailsAtG2):
case fieldNum(Table1, ImledPailsAtG3):
case fieldNum(Table1, ImledPailsAtG4):
case fieldNum(Table1, PreviousIndentNumber):
Case fieldNum(Table1, AdjustedStock):
Case fieldNum(Table1,DateOfIndentSendToUnit):
Case fieldNum(Table1,QuantityOfLabelPrintedAtUnit6):
Case fieldNum(Table1,QtyOLabelRecievedByunit1FromUnit6):
this.TotalFilmJarLabels = this.JarPrintedLabelStockAtUnit1 +
this.JarPrintedLabelStockAtUnit1Roll +
this.JarPrintedLabelStockAtUnit2 +
this.JarPrintedLabelStockAtUnit3 +
this.JarPrintedLabelStockAtUnit4 +
this.JarPrintedLabelStockAtUnit5 +
this.JarPrintedLabelStockAtUnit6 +
this.JarPrintedLabelStockAtUnit7+
this.ImledJarAtUnit1 +
this.ImledJarAtUnit2 +
this.ImledJarAtUnit3 +
this.ImledJarAtUnit4 +
this.ImledJarAtUnit5 +
//this.ImledJarAtUnit1 +
this.ImledJarAtUnit7 +
this.TransitJar+
this.ImledPailsAtG1 +
this.ImledPailsAtG2 +
this.ImledPailsAtG3 +
this.ImledPailsAtG4 +
this.AdjustedStock;
this.TotalFilmCapLabels = this.CapPrintedLabelsStockatUnit1 +
this.CapPrintedLabelsStockatUnit1Roll +
this.CapPrintedLabelsStockatUnit2 +
this.CapPrintedLabelsStockatUnit3 +
this.CapPrintedLabelsStockatUnit4 +
this.CapPrintedLabelsStockatUnit5 +
this.CapPrintedLabelsStockatUnit6 +
this.CapPrintedLabelsStockatUnit7 +
// this.ImledCapAtUnit1 +
//this.ImledCapAtUnit2 +
// this.ImledCapAtUnit3 +
// this.ImledCapAtUnit4 +
this.ImledCapAtUnit5 +
//this.ImledCapAtUnit1 +
this.ImledCapAtUnit7 +
this.TransitCap;
//IndentedJarQtyToU6
this.Stock = this.QuantityOfLabelPrintedAtUnit6 - this.QtyOLabelRecievedByunit1FromUnit6;
if(this.DateOfIndentSendToUnit == Global::datenull())
{
this.IndentedJarQtyToU6 = 0;
}
else
{
this.IndentedJarQtyToU6 = max(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne + this.AdjustedProjection - this.TotalFilmJarLabels,0);
}
this.IndentedCapQtyToU6 = real2int(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne - this.TotalFilmCapLabels);
if(this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty > 0)
{
this.BalanceQtyToBeRecievedFrmUnit6againstInd = max(this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty,0); //X
this.ExcessQtyProducedAgainstIndent =0;
}
else
{
this.BalanceQtyToBeRecievedFrmUnit6againstInd =0;
this.ExcessQtyProducedAgainstIndent = (this.IndentedJarQtyToU6 - this.QtyOLabelRecievedByunit1FromUnit6 + this.Qty);//Y
}
this.Total = real2int(this.Aug15prijectedCallupQty + this.Sep15prijectedCallupQty + this.NextMonthPlusOne + this.AdjustedProjection);
break;
}
}
******************************************
Find:
static public Table1 find(RecId _recId)
{
Table1 table1;
select firstonly table1
where table1.RecId == _recId;
return table1;
}
*****************************
Form Methods:
public void updateNumberSeq()
{
Table1 table1Loc;
InventSite inventSite;
select maxOf(RecId) from table1Loc
where table1Loc.ERPItemCodes == Table1.ERPItemCodes//'unit-2'
&& table1Loc.Site == Table1.Site;//'IML7.5LTRCRBMULTILAB';
Table1.IndentNumberToUnitEdit = Table1::find(table1Loc.RecId).IndentNumberToUnit;
// info(Table1::find(table1Loc.RecId).IndentNumberToUnit);
}
What is this... :D Crazy...
ReplyDelete