示例#1
0
 private void createMiscBill() {
   Miscbilldetail miscbilldetail = new Miscbilldetail();
   // Since we are not creating any bill for advance payment, we are updating bill no, bill date
   // and bill amount from ARF
   miscbilldetail.setBillnumber(advanceRequisition.getAdvanceRequisitionNumber());
   miscbilldetail.setBilldate(advanceRequisition.getAdvanceRequisitionDate());
   miscbilldetail.setBillamount(advanceRequisition.getAdvanceRequisitionAmount());
   miscbilldetail.setPassedamount(advanceRequisition.getAdvanceRequisitionAmount());
   miscbilldetail.setPaidamount(advanceRequisition.getAdvanceRequisitionAmount());
   miscbilldetail.setPaidto(advanceRequisition.getEgAdvanceReqMises().getPayto());
   miscbilldetail.setPayVoucherHeader(paymentheader.getVoucherheader());
   miscbilldetailService.persist(miscbilldetail);
 }
示例#2
0
  private void validateAdvancePaymentExists() {

    if (advanceRequisition != null
        && advanceRequisition.getEgAdvanceReqMises().getVoucherheader() != null
        && advanceRequisition.getEgAdvanceReqMises().getVoucherheader().getStatus() != 4) {
      populateBankAccounts(Integer.parseInt(commonBean.getBankId().split("-")[1]), fund.getId());
      throw new ValidationException(
          Arrays.asList(
              new ValidationError(
                  "arf.payment.uniqueCheck.validate.message",
                  getText(
                      "arf.payment.uniqueCheck.validate.message",
                      new String[] {advanceRequisition.getAdvanceRequisitionNumber()}))));
    }
  }