use of com.axelor.apps.account.db.PaymentScheduleLine in project axelor-open-suite by axelor.
the class PaymentScheduleLineBankPaymentServiceImpl method reject.
@Override
public void reject(String paymentScheduleLineName, InterbankCodeLine rejectionReason, boolean represent) throws AxelorException {
PaymentScheduleLine paymentScheduleLine = paymentScheduleLineRepo.findByName(paymentScheduleLineName);
reject(paymentScheduleLine, rejectionReason, represent);
}
use of com.axelor.apps.account.db.PaymentScheduleLine in project axelor-open-suite by axelor.
the class PaymentScheduleLineBankPaymentServiceImpl method reject.
@Override
public void reject(long id, InterbankCodeLine rejectionReason, boolean represent) throws AxelorException {
PaymentScheduleLine paymentScheduleLine = paymentScheduleLineRepo.find(id);
reject(paymentScheduleLine, rejectionReason, represent);
}
use of com.axelor.apps.account.db.PaymentScheduleLine in project axelor-open-suite by axelor.
the class PaymentScheduleLineBankPaymentServiceImpl method representPaymentScheduleLine.
@Transactional
protected PaymentScheduleLine representPaymentScheduleLine(PaymentScheduleLine paymentScheduleLine) {
PaymentSchedule paymentSchedule = paymentScheduleLine.getPaymentSchedule();
BigDecimal inTaxAmount = paymentScheduleLine.getInTaxAmount();
int scheduleLineSeq = paymentScheduleService.getNextScheduleLineSeq(paymentSchedule);
LocalDate scheduleDate = paymentScheduleLine.getScheduleDate();
PaymentScheduleLine representedPaymentScheduleLine = createPaymentScheduleLine(paymentSchedule, inTaxAmount, scheduleLineSeq, scheduleDate);
representedPaymentScheduleLine.setFromReject(true);
representedPaymentScheduleLine.setStatusSelect(PaymentScheduleLineRepository.STATUS_IN_PROGRESS);
return representedPaymentScheduleLine;
}
use of com.axelor.apps.account.db.PaymentScheduleLine 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;
}
use of com.axelor.apps.account.db.PaymentScheduleLine in project axelor-open-suite by axelor.
the class IrrecoverableService method getIrrecoverable.
/**
* Procédure permettant de remplir la liste des factures et échéances rejetées à passer en
* irrécouvrable d'une société, ansi que de remplir le champ nom de l'objet irrécouvrable
*
* @param irrecoverable Un objet Irrécouvrable
* @throws AxelorException
*/
@Transactional(rollbackOn = { Exception.class })
public void getIrrecoverable(Irrecoverable irrecoverable) throws AxelorException {
Company company = irrecoverable.getCompany();
this.testCompanyField(company);
if (irrecoverable.getName() == null) {
irrecoverable.setName(this.getSequence(company));
}
irrecoverable.setInvoiceSet(new HashSet<Invoice>());
irrecoverable.getInvoiceSet().addAll(this.getInvoiceList(company));
irrecoverable.getInvoiceSet().addAll(this.getRejectInvoiceList(company));
irrecoverable.setPaymentScheduleLineSet(new HashSet<PaymentScheduleLine>());
irrecoverable.getPaymentScheduleLineSet().addAll(this.getPaymentScheduleLineList(company));
irrecoverableRepo.save(irrecoverable);
}
Aggregations