|
|
@ -1,5 +1,6 @@
|
|
|
|
package info.bukova.isspst.ui.main.orders.requirements;
|
|
|
|
package info.bukova.isspst.ui.main.orders.requirements;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import info.bukova.isspst.data.MUnitEmb;
|
|
|
|
import info.bukova.isspst.data.Material;
|
|
|
|
import info.bukova.isspst.data.Material;
|
|
|
|
import info.bukova.isspst.data.Requirement;
|
|
|
|
import info.bukova.isspst.data.Requirement;
|
|
|
|
import info.bukova.isspst.data.RequirementItem;
|
|
|
|
import info.bukova.isspst.data.RequirementItem;
|
|
|
@ -234,6 +235,15 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
|
|
|
|
|
|
|
|
if (subject != null)
|
|
|
|
if (subject != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
boolean isMaterial = (subject instanceof Material);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isMaterial)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Material materialItem = (Material) subject;
|
|
|
|
|
|
|
|
MUnitEmb munit = materialItem.getMunit();
|
|
|
|
|
|
|
|
this.selectedItem.setMunit(munit);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Skupina materiálu nebo služeb je propojená, nastavit k zadanému
|
|
|
|
// Skupina materiálu nebo služeb je propojená, nastavit k zadanému
|
|
|
|
// kódu i správný název skupiny materiálu nebo služby
|
|
|
|
// kódu i správný název skupiny materiálu nebo služby
|
|
|
|
this.selectedItem.setName(subject.getName());
|
|
|
|
this.selectedItem.setName(subject.getName());
|
|
|
@ -254,7 +264,7 @@ public class RequirementForm extends FormViewModel<Requirement>
|
|
|
|
item.setUnitPrice(BigDecimal.valueOf(0));
|
|
|
|
item.setUnitPrice(BigDecimal.valueOf(0));
|
|
|
|
item.setTotal(BigDecimal.valueOf(0));
|
|
|
|
item.setTotal(BigDecimal.valueOf(0));
|
|
|
|
item.setDescription("");
|
|
|
|
item.setDescription("");
|
|
|
|
item.setMunit(null);
|
|
|
|
item.setMunit(new MUnitEmb());
|
|
|
|
|
|
|
|
|
|
|
|
this.setSelectedItem(item);
|
|
|
|
this.setSelectedItem(item);
|
|
|
|
this.getDataBean().addItem(item);
|
|
|
|
this.getDataBean().addItem(item);
|
|
|
|