else
grid.getOtherGridParams().remove(ApplicationConsts.END_DATE);
}
});
final Domain d = new Domain("INVOICE_DOC_TYPES");
d.addDomainPair("","all invoices");
d.addDomainPair(ApplicationConsts.SALE_DESK_DOC_TYPE,"desk selling");
d.addDomainPair(ApplicationConsts.SALE_GENERIC_INVOICE,"sale invoice");
d.addDomainPair(ApplicationConsts.PURCHASE_GENERIC_INVOICE,"purchase invoice");
controlDocType.setDomain(d);
controlDocType.getComboBox().addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == e.SELECTED) {
if (controlDocType.getValue()==null ||
controlDocType.getValue().equals(""))
grid.getOtherGridParams().remove(ApplicationConsts.DOC_TYPE);
else
grid.getOtherGridParams().put(ApplicationConsts.DOC_TYPE,controlDocType.getValue());
}
}
});
controlShowPayed.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
if (controlShowPayed.isSelected())
// show all expirations: remove filter...
grid.getOtherGridParams().remove(ApplicationConsts.PAYED);
else
// show NOT yet payed expirations: apply filter on "N" (not payed)
grid.getOtherGridParams().put(ApplicationConsts.PAYED,"N");
}
});
// controlShowPayed.setSelected(true);
grid.getOtherGridParams().put(ApplicationConsts.PAYED,"N");
colValue.setDynamicSettings(this);
colPayedValue.setDynamicSettings(this);
colAlreadyPayed.setDynamicSettings(this);
Domain docTypeDomain = new Domain("DOC_TYPE");
docTypeDomain.addDomainPair(ApplicationConsts.PURCHASE_INVOICE_DOC_TYPE,"purchase invoice");
docTypeDomain.addDomainPair(ApplicationConsts.PURCHASE_INVOICE_FROM_DN_DOC_TYPE,"purchase invoice from delivery notes");
docTypeDomain.addDomainPair(ApplicationConsts.PURCHASE_INVOICE_FROM_PD_DOC_TYPE,"purchase invoice from purchase document");
docTypeDomain.addDomainPair(ApplicationConsts.PURCHASE_DEBIT_NOTE_DOC_TYPE,"debiting note");
docTypeDomain.addDomainPair(ApplicationConsts.PURCHASE_GENERIC_INVOICE,"purchase generic document");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_INVOICE_DOC_TYPE,"sale invoice");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_INVOICE_FROM_DN_DOC_TYPE,"sale invoice from delivery notes");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_INVOICE_FROM_SD_DOC_TYPE,"sale invoice from sale document");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_CREDIT_NOTE_DOC_TYPE,"credit note");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_GENERIC_INVOICE,"sale generic document");
docTypeDomain.addDomainPair(ApplicationConsts.SALE_DESK_DOC_TYPE,"desk selling");
colDocType.setDomain(docTypeDomain);
// payment lookup...
payTypeDataLocator.setGridMethodName("loadPaymentTypes");