use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VInvoiceGen method dynInit.
// jbInit
/**
* Fill Picks.
* Column_ID from C_Order
* @throws Exception if Lookups cannot be initialized
*/
public void dynInit() throws Exception {
MLookup orgL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2163, DisplayType.TableDir);
fOrg = new VLookup("AD_Org_ID", false, false, true, orgL);
// lOrg.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
fOrg.addVetoableChangeListener(this);
MLookup docActionL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 3494, /* C_Invoice.DocStatus */
DisplayType.List, Env.getLanguage(Env.getCtx()), "DocAction", 135, /* _Document Action */
false, "AD_Ref_List.Value IN ('CO','PR')");
docAction = new VLookup("DocAction", true, false, true, docActionL);
// lDcoACtion.setText((Msg.translate(Env.getCtx(), "DocAction")););
docAction.addVetoableChangeListener(this);
//@Trifon - Pre-select "Prepare"
docAction.setValue("PR");
//
MLookup bpL = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 2762, DisplayType.Search);
fBPartner = new VLookup("C_BPartner_ID", false, false, true, bpL);
// lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fBPartner.addVetoableChangeListener(this);
//Document Type Sales Order/Vendor RMA
lDocType.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
cmbDocType.addItem(new KeyNamePair(MOrder.Table_ID, Msg.translate(Env.getCtx(), "Order")));
cmbDocType.addItem(new KeyNamePair(MRMA.Table_ID, Msg.translate(Env.getCtx(), "CustomerRMA")));
cmbDocType.addActionListener(this);
//@@
panel.getStatusBar().setStatusLine(Msg.getMsg(Env.getCtx(), "InvGenerateSel"));
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VCreateFromInvoiceUI method initBPartner.
// vetoableChange
/**************************************************************************
* Load BPartner Field
* @param forInvoice true if Invoices are to be created, false receipts
* @throws Exception if Lookups cannot be initialized
*/
protected void initBPartner(boolean forInvoice) throws Exception {
// load BPartner
// C_Invoice.C_BPartner_ID
int AD_Column_ID = 3499;
MLookup lookup = MLookupFactory.get(Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
bPartnerField = new VLookup("C_BPartner_ID", true, false, true, lookup);
//
int C_BPartner_ID = getC_BPartner_ID();
bPartnerField.setValue(C_BPartner_ID);
// initial loading
initBPOrderDetails(C_BPartner_ID, forInvoice);
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VCollectDetail method loadCreditMemo.
/**
* Load for Credit Memo
* @return void
*/
private void loadCreditMemo() {
creditMemoPanel = new CPanel(layout);
// Add label credit note
labelCreditMemo = new CLabel(Msg.translate(Env.getCtx(), "CreditMemo") + ":");
labelCreditMemo.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
// For Credit Memo
MLookup cardNotelookup = getCreditMemoLockup(parentCollect.getC_BPartner_ID());
fieldCreditMemo = new VLookup("CreditMemo", false, false, true, cardNotelookup);
// For Credit Memo Type
// ((VComboBox)fieldCreditMemo.getCombo()).setRenderer(new POSLookupListCellRenderer(font));
fieldCreditMemo.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
// ((VComboBox)fieldCreditMemo.getCombo()).setFont(font);
fieldCreditMemo.addVetoableChangeListener(this);
// Add to Panel
creditMemoPanel.add(labelCreditMemo, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
creditMemoPanel.add(fieldCreditMemo, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
// Default visible false
creditMemoPanel.setVisible(false);
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VCollectDetail method loadStandardPanel.
/**
* Load Standard Fields for Collect
* @return void
*/
private void loadStandardPanel() {
standardPanel = new CPanel(layout);
// For Tender Type
// C_Payment_v.TenderType
int columnId = 8416;
MLookup lookup = MLookupFactory.get(Env.getCtx(), 0, 0, columnId, DisplayType.List);
fieldTenderType = new VLookup("TenderType", true, false, true, lookup);
((VComboBox) fieldTenderType.getCombo()).setRenderer(new POSLookupListCellRenderer(font));
fieldTenderType.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
((VComboBox) fieldTenderType.getCombo()).setFont(font);
fieldTenderType.addVetoableChangeListener(this);
// For Amount
fieldPayAmt = new VNumber("PayAmt", true, false, true, DisplayType.Amount, "");
fieldPayAmt.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
fieldPayAmt.setFont(font);
fieldPayAmt.setValue(Env.ZERO);
fieldPayAmt.addVetoableChangeListener(this);
fieldPayAmt.addKeyListener(this);
// Button
AppsAction action = new AppsAction("Minus", KeyStroke.getKeyStroke(KeyEvent.VK_F2, Event.F2), false);
action.setDelegate(this);
buttonMinus = (CButton) action.getButton();
buttonMinus.setPreferredSize(new Dimension(FIELD_HEIGHT, FIELD_HEIGHT));
buttonMinus.setFocusable(false);
// Add Tender Type
standardPanel.add(fieldTenderType, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
standardPanel.add(fieldPayAmt, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NORTH, new Insets(2, 0, 2, 2), 0, 0));
}
use of org.compiere.grid.ed.VLookup in project adempiere by adempiere.
the class VOrderDistributionReceipt method fillPicks.
// jbInit
/**
* Fill Picks.
* Column_ID from C_Order
* @throws Exception if Lookups cannot be initialized
*/
private void fillPicks() throws Exception {
Language language = Language.getLoginLanguage();
MLookup orderL = MLookupFactory.get(Env.getCtx(), m_WindowNo, MColumn.getColumn_ID(MDDOrder.Table_Name, MDDOrder.COLUMNNAME_DD_Order_ID), DisplayType.Search, language, MDDOrder.COLUMNNAME_DD_Order_ID, 0, false, "DocStatus='CO' AND IsInTransit='Y'");
fOrder = new VLookup(MDDOrder.COLUMNNAME_DD_Order_ID, true, false, true, orderL);
lOrder.setText(Msg.translate(Env.getCtx(), MDDOrder.COLUMNNAME_DD_Order_ID));
fOrder.addVetoableChangeListener(this);
Timestamp today = new Timestamp(System.currentTimeMillis());
m_MovementDate = today;
fMovementDate.setValue(today);
fMovementDate.addVetoableChangeListener(this);
}
Aggregations