Active in form x++ :
public int active()
{
int ret;
ret = super();
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
return ret;
}
==============================================
int active()
{
int ret;
boolean returnItem = salesTable.returnItem();
;
showMsgWriteRestriction = true;
ret = super();
element.UpdateDObtn();
buttonLineSetup. enabled(true);
buttonHeaderFunction. enabled(!returnItem);
buttonHeaderTradeAgreements. enabled(!returnItem);
buttonLineFunction. enabled(!returnItem && salesTable.RecId);
buttonLineInquiry. enabled(!returnItem);
buttonLinePriceCalc. enabled(!returnItem);
configuration. enabled(!returnItem);
buttonLineExplosion. enabled(true);
bomConsistOfTree. enabled(true);
buttonLineProduction. enabled(true);
buttonAttachedSalesLines. enabled(salesTable.type().canHaveAttachedOrders());
inventTransPick. enabled(true);
wmsOrderAllowCreate. enabled(true);
// added by adit -RetentionRealization tidak dapat diubah jika SO Status = closed
salesLine_ds.object(fieldnum(SalesLine, BIT_RetentionRealization)).allowEdit(salesLine.BIT_StatusSO == BIT_StatusSO::Open);
// ended by adit
salesLine_ds.object(fieldnum(SalesLine, SalesUnit)).allowEdit(salesLine.SalesQty == salesLine.RemainSalesPhysical);
salesLine_ds.object(fieldnum(SalesLine, SalesDeliverNow)).allowEdit(salesLine.DeliveryType != TradeLineDlvType::DropShip);
element.setCaptionText();
if (salesLine.RecId)
{
element.setEditItemAllowed(false);
}
else
{
element.setEditItemAllowed(true);
}
salesLine_ds.allowCreate(element.createLineAllowed());
salesLine_ds.allowEdit (salesTableForm.editLineAllowed());
salesLine_ds.allowDelete(salesTableForm.deleteLineAllowed(salesLine));
element.checkCreditNoteLine();
element.updateDesign(InventDimFormDesignUpdate::Active);
element.updateRFIDTagging();
if (headerError)
{
salesTable.Touched = NoYes::Yes;
headerError = false;
}
// PBA begin
element.pbAsetEnabled();
// PBA end
buttonLineInterCompany.enabled(salesTableForm.interCompanyShowButtonLine());
salesTableForm.interCompanySetLineAccess(salesLine,address,lineAddress);
if (salesLine.ProjId)
{
lineInquiry_CostControlCommittedCost.enabled(true);
}
else
{
lineInquiry_CostControlCommittedCost.enabled(false);
}
allowSetFocusOnItemId = true;
this.ActiveSalesLine(); // (nat) must be check again
if(salestable.CurrencyCode == companyinfo.CurrencyCode && salesline.SalesQty >= 1)
salesLine_ds.object(fieldnum(SalesLine, soltius_subsidi)).enabled(true);
else
salesLine_ds.object(fieldnum(SalesLine, soltius_subsidi)).enabled(false);
// for invent return recid mandatory if sales return
salesline_ds.object(fieldnum(salesline,soltius_inventreturnrecid)).mandatory(salesline.InventReturnRecidMandatory());
// for sales return addprice can not be edit
if(salesLine.SalesQty < 0 )
{
salesline_ds.object(fieldnum(salesline,soltius_addprice)).enabled(false);
}
else
salesline_ds.object(fieldnum(salesline,soltius_addprice)).enabled(true);
//SalesLine_ds.SalesLineAllowEdit();
SalesLine_ds.SalesLineAllowCreateDelete();
SalesLine_ds.SalesLineAllowEdit();
return ret;
}
=======================================
public int active()
{
int ret;
ret = super();
switch(TECCustValidate.TECStatusCustValidation)
{
case TECStatusCustValidation::Open :
MenuItemButtonPost.enabled(true);
MenuItemButtonReset.enabled(false);
break;
case TECStatusCustValidation::Posted :
MenuItemButtonPost.enabled(false);
MenuItemButtonReset.enabled(true);
break;
case TECStatusCustValidation::Reset :
MenuItemButtonPost.enabled(false);
MenuItemButtonReset.enabled(false);
break;
}
return ret;
}
void clicked()
{
TECCustValidate.TECStatusCustValidation = TECStatusCustValidation::Posted;
TECCustValidate_ds.research();
// super();
}
void clicked()
{
TECCustValidate.TECStatusCustValidation = TECStatusCustValidation::Reset;
TECCustValidate_ds.research();
//super();
}
// Posting Journal
journalTableData = JournalTableData::newTable(inventJournalTable);
journalTableData.updateBlock(JournalBlockLevel::InUse,JournalBlockLevel::None);
if (!infolog.num(Exception::Error))
{
infolog.clear(0);
journalCheckPost =
InventjournalCheckPost::newJournalCheckPost(JournalCheckPostType::Post,InventJournalTable);
journalCheckPost.parmAutoBlock(true);
journalCheckPost.run();
}
public void initFromJournalTable()
{
// edit by tyo
TECMatSupLines _TECMatSupLines;
journalTrans.JournalId = this.journalTableData().journalTable().JournalId;
_TECMatSupLines.Ref = journalTrans.JournalId;
_TECMatSupLines.insert();
//_TECMatSupLines.update();
_TECMatSupLines.reread();
// edit by tyoa
}
=============================================
public int active()
{
int ret;
ret = super();
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, ID_TAX_Number_Reverse)).allowEdit(KRE_ID_Tax_VAT.ID_Tax_Isreturnitem);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, FakturPajakReserve)).allowEdit(!KRE_ID_Tax_VAT.ID_Tax_Isreturnitem && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, Id_JenisPajakDibebaskan)).allowEdit((KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O7||KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O8) && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, ID_TAX_Number)).visible(KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Incoming||KRE_ID_Tax_VAT.ID_Tax_Isreturnitem);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, FakturPajakReserve)).visible(KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, Id_JenisPajakDibebaskan)).visible((KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O7||KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O8) && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
return ret;
}
public int active()
{
int ret;
ret = super();
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);
return ret;
}
==============================================
int active()
{
int ret;
boolean returnItem = salesTable.returnItem();
;
showMsgWriteRestriction = true;
ret = super();
element.UpdateDObtn();
buttonLineSetup. enabled(true);
buttonHeaderFunction. enabled(!returnItem);
buttonHeaderTradeAgreements. enabled(!returnItem);
buttonLineFunction. enabled(!returnItem && salesTable.RecId);
buttonLineInquiry. enabled(!returnItem);
buttonLinePriceCalc. enabled(!returnItem);
configuration. enabled(!returnItem);
buttonLineExplosion. enabled(true);
bomConsistOfTree. enabled(true);
buttonLineProduction. enabled(true);
buttonAttachedSalesLines. enabled(salesTable.type().canHaveAttachedOrders());
inventTransPick. enabled(true);
wmsOrderAllowCreate. enabled(true);
// added by adit -RetentionRealization tidak dapat diubah jika SO Status = closed
salesLine_ds.object(fieldnum(SalesLine, BIT_RetentionRealization)).allowEdit(salesLine.BIT_StatusSO == BIT_StatusSO::Open);
// ended by adit
salesLine_ds.object(fieldnum(SalesLine, SalesUnit)).allowEdit(salesLine.SalesQty == salesLine.RemainSalesPhysical);
salesLine_ds.object(fieldnum(SalesLine, SalesDeliverNow)).allowEdit(salesLine.DeliveryType != TradeLineDlvType::DropShip);
element.setCaptionText();
if (salesLine.RecId)
{
element.setEditItemAllowed(false);
}
else
{
element.setEditItemAllowed(true);
}
salesLine_ds.allowCreate(element.createLineAllowed());
salesLine_ds.allowEdit (salesTableForm.editLineAllowed());
salesLine_ds.allowDelete(salesTableForm.deleteLineAllowed(salesLine));
element.checkCreditNoteLine();
element.updateDesign(InventDimFormDesignUpdate::Active);
element.updateRFIDTagging();
if (headerError)
{
salesTable.Touched = NoYes::Yes;
headerError = false;
}
// PBA begin
element.pbAsetEnabled();
// PBA end
buttonLineInterCompany.enabled(salesTableForm.interCompanyShowButtonLine());
salesTableForm.interCompanySetLineAccess(salesLine,address,lineAddress);
if (salesLine.ProjId)
{
lineInquiry_CostControlCommittedCost.enabled(true);
}
else
{
lineInquiry_CostControlCommittedCost.enabled(false);
}
allowSetFocusOnItemId = true;
this.ActiveSalesLine(); // (nat) must be check again
if(salestable.CurrencyCode == companyinfo.CurrencyCode && salesline.SalesQty >= 1)
salesLine_ds.object(fieldnum(SalesLine, soltius_subsidi)).enabled(true);
else
salesLine_ds.object(fieldnum(SalesLine, soltius_subsidi)).enabled(false);
// for invent return recid mandatory if sales return
salesline_ds.object(fieldnum(salesline,soltius_inventreturnrecid)).mandatory(salesline.InventReturnRecidMandatory());
// for sales return addprice can not be edit
if(salesLine.SalesQty < 0 )
{
salesline_ds.object(fieldnum(salesline,soltius_addprice)).enabled(false);
}
else
salesline_ds.object(fieldnum(salesline,soltius_addprice)).enabled(true);
//SalesLine_ds.SalesLineAllowEdit();
SalesLine_ds.SalesLineAllowCreateDelete();
SalesLine_ds.SalesLineAllowEdit();
return ret;
}
=======================================
public int active()
{
int ret;
ret = super();
switch(TECCustValidate.TECStatusCustValidation)
{
case TECStatusCustValidation::Open :
MenuItemButtonPost.enabled(true);
MenuItemButtonReset.enabled(false);
break;
case TECStatusCustValidation::Posted :
MenuItemButtonPost.enabled(false);
MenuItemButtonReset.enabled(true);
break;
case TECStatusCustValidation::Reset :
MenuItemButtonPost.enabled(false);
MenuItemButtonReset.enabled(false);
break;
}
return ret;
}
void clicked()
{
TECCustValidate.TECStatusCustValidation = TECStatusCustValidation::Posted;
TECCustValidate_ds.research();
// super();
}
void clicked()
{
TECCustValidate.TECStatusCustValidation = TECStatusCustValidation::Reset;
TECCustValidate_ds.research();
//super();
}
// Posting Journal
journalTableData = JournalTableData::newTable(inventJournalTable);
journalTableData.updateBlock(JournalBlockLevel::InUse,JournalBlockLevel::None);
if (!infolog.num(Exception::Error))
{
infolog.clear(0);
journalCheckPost =
InventjournalCheckPost::newJournalCheckPost(JournalCheckPostType::Post,InventJournalTable);
journalCheckPost.parmAutoBlock(true);
journalCheckPost.run();
}
public void initFromJournalTable()
{
// edit by tyo
TECMatSupLines _TECMatSupLines;
journalTrans.JournalId = this.journalTableData().journalTable().JournalId;
_TECMatSupLines.Ref = journalTrans.JournalId;
_TECMatSupLines.insert();
//_TECMatSupLines.update();
_TECMatSupLines.reread();
// edit by tyoa
}
=============================================
public int active()
{
int ret;
ret = super();
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, ID_TAX_Number_Reverse)).allowEdit(KRE_ID_Tax_VAT.ID_Tax_Isreturnitem);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, FakturPajakReserve)).allowEdit(!KRE_ID_Tax_VAT.ID_Tax_Isreturnitem && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, Id_JenisPajakDibebaskan)).allowEdit((KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O7||KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O8) && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, ID_TAX_Number)).visible(KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Incoming||KRE_ID_Tax_VAT.ID_Tax_Isreturnitem);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, FakturPajakReserve)).visible(KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
KRE_ID_Tax_VAT_ds.object(fieldNum(KRE_ID_Tax_VAT, Id_JenisPajakDibebaskan)).visible((KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O7||KRE_ID_Tax_VAT.ID_Tax_PrefixNumber== KRE_ID_Tax_PrefixNumber::O8) && KRE_ID_Tax_VAT.ID_Tax_VATSource == KRE_ID_Tax_VATSource::Outgoing);
return ret;
}
0 comments:
Post a Comment