Skip to content

Commit

Permalink
#124 | Include AvniImplementationInventory field in for DistributionL…
Browse files Browse the repository at this point in the history
…ineItem, while posting Distribution upsert request.
  • Loading branch information
himeshr committed May 21, 2024
1 parent 839a795 commit 861c40f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"sourceId",
"distributedTo",
"implementationInventoryId",
"avniImplementationInventory",
"quantity",
"unit"
})
Expand All @@ -21,6 +22,8 @@ public class DistributionLine {
private String distributedTo;
@JsonProperty("implementationInventoryId")
private String implementationInventoryId;
@JsonProperty("avniImplementationInventory")
private String avniImplementationInventory;
@JsonProperty("quantity")
private int quantity;
@JsonProperty("unit")
Expand All @@ -40,14 +43,17 @@ public DistributionLine() {
* @param quantity
* @param unit
* @param implementationInventoryId
* @param avniImplementationInventory
*/
public DistributionLine(String sourceId, String distributedTo, String implementationInventoryId, int quantity, String unit) {
public DistributionLine(String sourceId, String distributedTo, String implementationInventoryId, int quantity, String unit,
String avniImplementationInventory) {
super();
this.sourceId = sourceId;
this.distributedTo = distributedTo;
this.implementationInventoryId = implementationInventoryId;
this.quantity = quantity;
this.unit = unit;
this.avniImplementationInventory = avniImplementationInventory;
}

@JsonProperty("sourceId")
Expand All @@ -74,6 +80,14 @@ public String getimplementationInventoryId() {
public void setimplementationInventoryId(String implementationInventoryId) {
this.implementationInventoryId = implementationInventoryId;
}
@JsonProperty("avniImplementationInventory")
public String getAvniImplementationInventory() {
return avniImplementationInventory;
}
@JsonProperty("avniImplementationInventory")
public void setAvniImplementationInventory(String avniImplementationInventory) {
this.avniImplementationInventory = avniImplementationInventory;
}
@JsonProperty("quantity")
public int getQuantity() {
return quantity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private DistributionLine createDistributionLine(HashMap<String, Object> entry, S
String distributedTo = (String) entry.get(DISTRIBUTED_TO);
String unit = (String) inventorySubject.getObservation(UNIT);
int quantity = (Integer) entry.get(QUANTITY);
return new DistributionLine(sourceId, distributedTo, inventoryExternalId, quantity, unit);
return new DistributionLine(sourceId, distributedTo, inventoryExternalId, quantity, unit, inventorySubject.getUuid());
}

private List<DistributionActivities> fetchActivities(Subject subject) {
Expand Down

0 comments on commit 861c40f

Please sign in to comment.