use of de.metas.i18n.IMsgBL in project metasfresh-webui-api by metasfresh.
the class InvoiceLineQuickInputDescriptorFactory method createEntityDescriptor.
private DocumentEntityDescriptor createEntityDescriptor(final DocumentType documentType, final DocumentId documentTypeId, final DetailId detailId, @NonNull final Optional<Boolean> soTrx) {
final IMsgBL msgBL = Services.get(IMsgBL.class);
final DocumentEntityDescriptor.Builder entityDescriptor = DocumentEntityDescriptor.builder().setDocumentType(DocumentType.QuickInput, documentTypeId).setIsSOTrx(soTrx).disableDefaultTableCallouts().setDetailId(detailId);
entityDescriptor.addField(DocumentFieldDescriptor.builder(IInvoiceLineQuickInput.COLUMNNAME_M_Product_ID).setCaption(msgBL.translatable(IInvoiceLineQuickInput.COLUMNNAME_M_Product_ID)).setWidgetType(DocumentFieldWidgetType.Lookup).setLookupDescriptorProvider(ProductLookupDescriptor.builderWithoutStockInfo().bpartnerParamName(I_C_Invoice.COLUMNNAME_C_BPartner_ID).pricingDateParamName(I_C_Invoice.COLUMNNAME_DateInvoiced).build()).setMandatoryLogic(true).setDisplayLogic(ConstantLogicExpression.TRUE).addCharacteristic(Characteristic.PublicField));
entityDescriptor.addField(DocumentFieldDescriptor.builder(IInvoiceLineQuickInput.COLUMNNAME_Qty).setCaption(msgBL.translatable(IInvoiceLineQuickInput.COLUMNNAME_Qty)).setWidgetType(DocumentFieldWidgetType.Quantity).setMandatoryLogic(true).addCharacteristic(Characteristic.PublicField));
return entityDescriptor.build();
}
use of de.metas.i18n.IMsgBL in project metasfresh-webui-api by metasfresh.
the class EmptiesQuickInputDescriptorFactory method createEntityDescriptor.
private DocumentEntityDescriptor createEntityDescriptor(final DocumentId documentTypeId, final DetailId detailId, @NonNull final Optional<Boolean> soTrx) {
final IMsgBL msgBL = Services.get(IMsgBL.class);
final DocumentEntityDescriptor.Builder entityDescriptor = DocumentEntityDescriptor.builder().setDocumentType(DocumentType.QuickInput, documentTypeId).setIsSOTrx(soTrx).disableDefaultTableCallouts().setDataBinding(DocumentEntityDataBindingDescriptorBuilder.NULL).setDetailId(detailId);
entityDescriptor.addField(DocumentFieldDescriptor.builder(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID).setCaption(msgBL.translatable(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID)).setWidgetType(DocumentFieldWidgetType.Lookup).setLookupDescriptorProvider(SqlLookupDescriptor.builder().setCtxTableName(// ctxTableName
null).setCtxColumnName(IEmptiesQuickInput.COLUMNNAME_M_HU_PackingMaterial_ID).setDisplayType(DisplayType.Search).buildProvider()).setValueClass(IntegerLookupValue.class).setReadonlyLogic(ConstantLogicExpression.FALSE).setAlwaysUpdateable(true).setMandatoryLogic(ConstantLogicExpression.TRUE).setDisplayLogic(ConstantLogicExpression.TRUE).addCharacteristic(Characteristic.PublicField));
entityDescriptor.addField(DocumentFieldDescriptor.builder(IEmptiesQuickInput.COLUMNNAME_Qty).setCaption(msgBL.translatable(IEmptiesQuickInput.COLUMNNAME_Qty)).setWidgetType(DocumentFieldWidgetType.Integer).setReadonlyLogic(ConstantLogicExpression.FALSE).setAlwaysUpdateable(true).setMandatoryLogic(ConstantLogicExpression.TRUE).setDisplayLogic(ConstantLogicExpression.TRUE).addCharacteristic(Characteristic.PublicField));
return entityDescriptor.build();
}
Aggregations