ItEr42S17CUGravacionModelosUnidadesTraballoItEr41S20: Moving totalPrice to MaterialInfo so it can be reused.
This commit is contained in:
parent
5e39d32843
commit
8ccf8ed267
3 changed files with 10 additions and 2 deletions
|
|
@ -100,8 +100,7 @@ public class MaterialAssignment extends BaseEntity implements Comparable {
|
|||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
BigDecimal result = new BigDecimal(getUnits());
|
||||
return result.multiply(getUnitPrice());
|
||||
return getMaterialInfo().getTotalPrice();
|
||||
}
|
||||
|
||||
public Date getEstimatedAvailability() {
|
||||
|
|
|
|||
|
|
@ -99,4 +99,8 @@ public class MaterialAssignmentTemplate extends BaseEntity {
|
|||
getMaterialInfo().setUnitPrice(unitPrice);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
return getMaterialInfo().getTotalPrice();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,4 +70,9 @@ public class MaterialInfo {
|
|||
return result;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
BigDecimal result = new BigDecimal(getUnits());
|
||||
return result.multiply(getUnitPrice());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue