Search in sources :

Example 6 with Address

use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.

the class DocumentAdressUpdateView method main.

// End of variables declaration//GEN-END:variables
public static void main(String[] args) {
    Address invoice = new Address("Blubba, invoice");
    // TODO : fill Dl.remote().add(AddressService.class) // With a sample
    DocumentAdressUpdateView view = new DocumentAdressUpdateView(1, invoice.getDescription(), true);
    OkCancelDialog<DocumentAdressUpdateView> dialog = new OkCancelDialog<>("TOLLER TITEL", view);
    dialog.setVisible(true);
    System.exit(0);
}
Also used : Address(eu.ggnet.dwoss.redtape.ee.entity.Address)

Example 7 with Address

use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.

the class DocumentExactlyBriefedTest method testInvoiceAddressChange.

@Test
public void testInvoiceAddressChange() {
    assertTrue("Documents difference must not invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
    doc1.setInvoiceAddress(new Address("MuhBlub"));
    assertFalse("Invoice Address change must invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
}
Also used : Address(eu.ggnet.dwoss.redtape.ee.entity.Address)

Example 8 with Address

use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.

the class DocumentExactlyBriefedTest method testShippingAddressChange.

@Test
public void testShippingAddressChange() {
    assertTrue("Documents difference must not invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
    doc1.setShippingAddress(new Address("MuhBlub"));
    assertFalse("Shipping Address change must invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
}
Also used : Address(eu.ggnet.dwoss.redtape.ee.entity.Address)

Example 9 with Address

use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.

the class AddressEmo method request.

/**
 * Get a Address by description search.
 *
 * @param searchAddress the address description to search for.
 * @return a Address by description search or a new persisted Address.
 */
public Address request(String searchAddress) {
    AddressEao addressEao = new AddressEao(em);
    Address address = addressEao.findByDescription(searchAddress);
    // persist address if nothing is found
    if (address == null) {
        address = new Address(searchAddress);
        em.persist(address);
        return address;
    }
    return address;
}
Also used : Address(eu.ggnet.dwoss.redtape.ee.entity.Address) AddressEao(eu.ggnet.dwoss.redtape.ee.eao.AddressEao)

Example 10 with Address

use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.

the class DocumentSupporterIT method testCreate.

/**
 * Test of create method, of class RedTapeOperation.
 */
@Test
public void testCreate() {
    Dossier dos = new Dossier();
    dos.setPaymentMethod(PaymentMethod.ADVANCE_PAYMENT);
    dos.setDispatch(true);
    dos.setCustomerId(1);
    Document doc = new Document();
    doc.setType(DocumentType.ORDER);
    doc.setActive(true);
    doc.setDirective(Document.Directive.WAIT_FOR_MONEY);
    doc.setHistory(new DocumentHistory("JUnit", "Automatische Erstellung eines leeren Dokuments"));
    Address a = new Address("Herr Muh\nMuhstrasse 7\n12345 Muhstadt");
    doc.setInvoiceAddress(a);
    doc.setShippingAddress(a);
    dos.add(doc);
    doc.append(NaivBuilderUtil.comment());
    doc.append(NaivBuilderUtil.service());
    doc.append(NaivBuilderUtil.shippingcost());
    JasperPrint print = documentSupporter.render(doc, DocumentViewType.DEFAULT);
    assertNotNull("A JasperPrint should not be null", print);
}
Also used : Address(eu.ggnet.dwoss.redtape.ee.entity.Address) Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) JasperPrint(net.sf.jasperreports.engine.JasperPrint) DocumentHistory(eu.ggnet.dwoss.redtape.ee.entity.DocumentHistory) Document(eu.ggnet.dwoss.redtape.ee.entity.Document) Test(org.junit.Test)

Aggregations

Address (eu.ggnet.dwoss.redtape.ee.entity.Address)11 Document (eu.ggnet.dwoss.redtape.ee.entity.Document)6 Dossier (eu.ggnet.dwoss.redtape.ee.entity.Dossier)5 DocumentHistory (eu.ggnet.dwoss.redtape.ee.entity.DocumentHistory)4 Test (org.junit.Test)4 AddressEao (eu.ggnet.dwoss.redtape.ee.eao.AddressEao)2 Position (eu.ggnet.dwoss.redtape.ee.entity.Position)2 PositionBuilder (eu.ggnet.dwoss.redtape.ee.entity.PositionBuilder)2 Date (java.util.Date)2 JasperPrint (net.sf.jasperreports.engine.JasperPrint)2 PositionEao (eu.ggnet.dwoss.redtape.ee.eao.PositionEao)1 AddressEmo (eu.ggnet.dwoss.redtape.ee.emo.AddressEmo)1 Reminder (eu.ggnet.dwoss.redtape.ee.entity.Reminder)1 DocumentSupporterOperation (eu.ggnet.dwoss.redtapext.ee.DocumentSupporterOperation)1 BorderLayout (java.awt.BorderLayout)1 JFrame (javax.swing.JFrame)1 JRViewer (net.sf.jasperreports.swing.JRViewer)1 Logger (org.slf4j.Logger)1