Search in sources :

Example 1 with InvoiceItemForTesting

use of org.estatio.module.invoice.dom.InvoiceItemForTesting in project estatio by estatio.

the class InvoiceForLeaseDtoFactory_Test method newItem.

private static InvoiceItemForTesting newItem(final Invoice invoice, final String netAmt, final String grossAmt, final String vatAmt) {
    final InvoiceItemForTesting invoiceItem = new InvoiceItemForTesting(invoice);
    invoiceItem.setInvoice(invoice);
    final ChargeGroup chargeGroup = new ChargeGroup();
    final Charge charge = new Charge();
    charge.setGroup(chargeGroup);
    invoiceItem.setCharge(charge);
    final Tax tax = new Tax();
    invoiceItem.setTax(tax);
    invoiceItem.setNetAmount(new BigDecimal(netAmt));
    invoiceItem.setGrossAmount(new BigDecimal(grossAmt));
    invoiceItem.setVatAmount(new BigDecimal(vatAmt));
    return invoiceItem;
}
Also used : InvoiceItemForTesting(org.estatio.module.invoice.dom.InvoiceItemForTesting) ChargeGroup(org.estatio.module.charge.dom.ChargeGroup) Charge(org.estatio.module.charge.dom.Charge) Tax(org.estatio.module.tax.dom.Tax) BigDecimal(java.math.BigDecimal)

Aggregations

BigDecimal (java.math.BigDecimal)1 Charge (org.estatio.module.charge.dom.Charge)1 ChargeGroup (org.estatio.module.charge.dom.ChargeGroup)1 InvoiceItemForTesting (org.estatio.module.invoice.dom.InvoiceItemForTesting)1 Tax (org.estatio.module.tax.dom.Tax)1