use of eu.ggnet.dwoss.stock.ee.entity.Shipment in project dwoss by gg-net.
the class ShipmentUpdateTryout method tryout.
@Test
public void tryout() throws InterruptedException {
Dl.remote().add(Mandators.class, new Mandators() {
@Override
public Mandator loadMandator() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public DefaultCustomerSalesdata loadSalesdata() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ReceiptCustomers loadReceiptCustomers() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public SpecialSystemCustomers loadSystemCustomers() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Contractors loadContractors() {
return new Contractors(EnumSet.allOf(TradeName.class), EnumSet.allOf(TradeName.class));
}
@Override
public PostLedger loadPostLedger() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ShippingTerms loadShippingTerms() {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
});
// To start the platform
new JFXPanel();
Shipment s = new Shipment();
Platform.runLater(() -> {
ShipmentUpdateStage stage = new ShipmentUpdateStage(s);
stage.showAndWait();
System.out.println(stage.getShipment());
complete = true;
});
while (!complete) {
Thread.sleep(500);
}
}
use of eu.ggnet.dwoss.stock.ee.entity.Shipment in project dwoss by gg-net.
the class ShipmentController method editShipment.
public void editShipment() {
Platform.runLater(() -> {
Shipment shipment = model.getSelected();
if (shipment == null)
return;
ShipmentUpdateStage stage = new ShipmentUpdateStage(shipment);
stage.initModality(Modality.APPLICATION_MODAL);
stage.showAndWait();
if (!stage.isOk())
return;
shipment = stage.getShipment();
model.remove(shipment);
shipment = stockAgent.merge(shipment);
model.add(shipment);
});
}
use of eu.ggnet.dwoss.stock.ee.entity.Shipment in project dwoss by gg-net.
the class ShipmentController method deleteShipment.
public void deleteShipment() {
Shipment shipment = model.getSelected();
if (shipment == null)
return;
if (JOptionPane.showConfirmDialog(view, "Shipment " + shipment.getShipmentId() + " wirklich löschen ?", "Shipment löschen", JOptionPane.YES_NO_OPTION) != JOptionPane.YES_OPTION)
return;
stockAgent.delete(shipment);
model.remove(shipment);
}
use of eu.ggnet.dwoss.stock.ee.entity.Shipment in project dwoss by gg-net.
the class ShipmentController method inclusion.
/**
* Starts the Inclusion.
*
* @param row
*/
public void inclusion() {
Shipment shipment = model.getSelected();
if (shipment == null)
return;
StockTransaction stockTransaction = stockAgent.findOrCreateRollInTransaction(Dl.local().lookup(StockUpi.class).getActiveStock().getId(), Dl.local().lookup(Guardian.class).getUsername(), "Roll in through Inclusion");
ShipmentInclusionViewCask sip = new ShipmentInclusionViewCask(view, shipment, stockTransaction);
sip.setLocationRelativeTo(view);
sip.setVisible(true);
if (sip.isInclusionClosed())
shipment.setStatus(Shipment.Status.CLOSED);
else if (sip.isInclusionAbort())
shipment.setStatus(Shipment.Status.OPENED);
else
return;
model.remove(shipment);
shipment = stockAgent.merge(shipment);
model.add(shipment);
}
use of eu.ggnet.dwoss.stock.ee.entity.Shipment in project dwoss by gg-net.
the class ShipmentInclusionViewCask method main.
// End of variables declaration//GEN-END:variables
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
Shipment shipment = new Shipment();
shipment.setShipmentId("Muuuh");
shipment.setContractor(TradeName.LENOVO);
ShipmentInclusionViewCask sid = new ShipmentInclusionViewCask(null, shipment, null);
sid.setLocationRelativeTo(null);
sid.setVisible(true);
System.out.println("Is Aborted" + sid.isInclusionAbort());
System.out.println("Is Closed" + sid.isInclusionClosed());
System.exit(0);
}
Aggregations