Skip to content

Commit

Permalink
Show SerialNo attribute + trl (#10664)
Browse files Browse the repository at this point in the history
* consider extracting SerialNo attribute

* fix naming and trls
  • Loading branch information
teosarca committed Feb 18, 2021
1 parent bd98853 commit addcd4f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- 2021-02-18T08:38:09.652Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE M_Attribute SET Name='S/N',Updated=TO_TIMESTAMP('2021-02-18 10:38:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE M_Attribute_ID=540034
;

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- 2021-02-18T08:32:34.031Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_SysConfig SET Name='de.metas.ui.web.pickingV2.productsToPick.rows.ProductsToPickRow.field.huCode.IsDisplayed',Updated=TO_TIMESTAMP('2021-02-18 10:32:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_SysConfig_ID=541353
;

Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ public static ProductsToPickRow cast(final IViewRow row)
widgetSize = WidgetSize.Small)
private final LookupValue locator;

public static final String FIELD_HUValue = "huValue";
public static final String FIELD_HUValue = "huCode";
@ViewColumn(fieldName = FIELD_HUValue, widgetType = DocumentFieldWidgetType.Text,
captionKey = "HUValue",
captionKey = "HUCode",
displayed = Displayed.SYSCONFIG, displayedSysConfigPrefix = SYSCONFIG_PREFIX,
widgetSize = WidgetSize.Small)
private final String huValue;
private final String huCode;

public static final String FIELD_SerialNo = "serialNo";
@ViewColumn(fieldName = FIELD_SerialNo, widgetType = DocumentFieldWidgetType.Text,
Expand Down Expand Up @@ -198,7 +198,7 @@ private ProductsToPickRow(
//
final LookupValue locator,
//
final String huValue,
final String huCode,
final String serialNo,
final String lotNumber,
final LocalDate expiringDate,
Expand Down Expand Up @@ -230,7 +230,7 @@ private ProductsToPickRow(
this.huReservedForThisRow = huReservedForThisRow;

this.locator = locator;
this.huValue = huValue;
this.huCode = huCode;
this.serialNo = serialNo;
this.lotNumber = lotNumber;
this.expiringDate = expiringDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public final class ProductsToPickRowsDataFactory
public static final AttributeCode ATTR_RepackNumber = AttributeCode.ofString(ATTR_RepackNumber_String);

private static final ImmutableSet<AttributeCode> ATTRIBUTES = ImmutableSet.of(
ATTR_SerialNo,
ATTR_LotNumber,
ATTR_BestBeforeDate,
ATTR_RepackNumber);
Expand Down Expand Up @@ -485,7 +486,7 @@ private ProductsToPickRow createRow(
.locator(locator)
//
// Attributes:
.huValue(pickFromHUId != null ? String.valueOf(pickFromHUId.getRepoId()) : null)
.huCode(pickFromHUId != null ? String.valueOf(pickFromHUId.getRepoId()) : null)
.serialNo(attributes.getValueAsStringIfExists(ATTR_SerialNo).orElse(null))
.lotNumber(attributes.getValueAsStringIfExists(ATTR_LotNumber).orElseGet(() -> buildLotNumberFromHuId(pickFromHUId)))
.expiringDate(attributes.getValueAsLocalDateIfExists(ATTR_BestBeforeDate).orElse(null))
Expand Down

0 comments on commit addcd4f

Please sign in to comment.