Search in sources :

Example 1 with IrrecoverablePaymentScheduleLineLine

use of com.axelor.apps.account.db.IrrecoverablePaymentScheduleLineLine in project axelor-open-suite by axelor.

the class IrrecoverableService method createIrrecoverablePaymentScheduleLineLine.

/**
 * Fonction permettant de créer une ligne Echéance rejetée
 *
 * @param icl Une ligne Client
 * @param invoice Une échéance rejetée
 * @param seq Un numéro de séquence
 * @return
 * @throws AxelorException
 */
public IrrecoverablePaymentScheduleLineLine createIrrecoverablePaymentScheduleLineLine(IrrecoverableCustomerLine icl, PaymentScheduleLine paymentScheduleLine, int seq) throws AxelorException {
    IrrecoverablePaymentScheduleLineLine ipsll = new IrrecoverablePaymentScheduleLineLine();
    ipsll.setPaymentScheduleLine(paymentScheduleLine);
    ipsll.setIrrecoverableCustomerLine(icl);
    Company company = paymentScheduleLine.getPaymentSchedule().getCompany();
    Tax tax = accountConfigService.getIrrecoverableStandardRateTax(accountConfigService.getAccountConfig(company));
    ipsll.setIrrecoverableReportLineList(this.createIrrecoverableReportLineList(ipsll, paymentScheduleLine, tax));
    log.debug("Ligne échéance rejetée : {}", ipsll);
    return ipsll;
}
Also used : Company(com.axelor.apps.base.db.Company) IrrecoverablePaymentScheduleLineLine(com.axelor.apps.account.db.IrrecoverablePaymentScheduleLineLine) InvoiceLineTax(com.axelor.apps.account.db.InvoiceLineTax) Tax(com.axelor.apps.account.db.Tax)

Example 2 with IrrecoverablePaymentScheduleLineLine

use of com.axelor.apps.account.db.IrrecoverablePaymentScheduleLineLine in project axelor-open-suite by axelor.

the class IrrecoverableService method createIrrecoverablePaymentScheduleLineLineList.

/**
 * Fonction permettant de créer une liste de ligne d'échéance rejetée
 *
 * @param icl Une ligne Client
 * @param invoiceList Une liste de d'échéance rejetée du tiers payeur
 * @return
 * @throws AxelorException
 */
public List<IrrecoverablePaymentScheduleLineLine> createIrrecoverablePaymentScheduleLineLineList(IrrecoverableCustomerLine icl, List<PaymentScheduleLine> paymentScheduleLineList) throws AxelorException {
    int seq = 1;
    List<IrrecoverablePaymentScheduleLineLine> ipsllList = new ArrayList<IrrecoverablePaymentScheduleLineLine>();
    for (PaymentScheduleLine paymentScheduleLine : paymentScheduleLineList) {
        ipsllList.add(this.createIrrecoverablePaymentScheduleLineLine(icl, paymentScheduleLine, seq));
        seq++;
    }
    return ipsllList;
}
Also used : IrrecoverablePaymentScheduleLineLine(com.axelor.apps.account.db.IrrecoverablePaymentScheduleLineLine) PaymentScheduleLine(com.axelor.apps.account.db.PaymentScheduleLine) ArrayList(java.util.ArrayList)

Aggregations

IrrecoverablePaymentScheduleLineLine (com.axelor.apps.account.db.IrrecoverablePaymentScheduleLineLine)2 InvoiceLineTax (com.axelor.apps.account.db.InvoiceLineTax)1 PaymentScheduleLine (com.axelor.apps.account.db.PaymentScheduleLine)1 Tax (com.axelor.apps.account.db.Tax)1 Company (com.axelor.apps.base.db.Company)1 ArrayList (java.util.ArrayList)1