@Service public class CreateVoucher extends Object
| Constructor and Description |
|---|
CreateVoucher() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkMandatoryField(String fieldName,
Object value,
HashMap<String,Object> headerdetails,
List<String> mandatoryFields) |
org.egov.commons.CVoucherHeader |
createPreApprovedVoucher(HashMap<String,Object> headerdetails,
List<HashMap<String,Object>> accountcodedetails,
List<HashMap<String,Object>> subledgerdetails)
This API is to create a voucher from the list of HashMap values that are
passed.
|
List<Transaxtion> |
createTransaction(HashMap<String,Object> headerdetails,
List<HashMap<String,Object>> accountcodedetails,
List<HashMap<String,Object>> subledgerdetails,
org.egov.commons.CVoucherHeader vh) |
org.egov.commons.CVoucherHeader |
createVoucher(HashMap<String,Object> headerdetails,
List<HashMap<String,Object>> accountcodedetails,
List<HashMap<String,Object>> subledgerdetails)
This API is to create a voucher from the list of HashMap values that are
passed.
|
long |
createVoucherFromBill(int billId,
String voucherStatus,
String voucherNumber,
Date voucherDate)
creates voucher From billId
|
long |
createVoucherFromBillForPJV(int billId,
String voucherStatus,
List<PreApprovedVoucher> voucherdetailList,
List<PreApprovedVoucher> subLedgerList)
creates voucher From billId
|
void |
createVoucherFromPreApprovedVoucher(long vouhcerheaderid,
String status) |
org.egov.commons.CVoucherHeader |
createVoucherHeader(HashMap<String,Object> headerdetails) |
org.egov.commons.Vouchermis |
createVouchermis(HashMap<String,Object> headerdetails) |
void |
deleteVoucherdetailAndGL(org.egov.commons.CVoucherHeader vh) |
org.egov.infra.admin.master.service.AppConfigService |
getAppConfigService() |
org.egov.infra.admin.master.service.AppConfigValueService |
getAppConfigValuesService() |
protected String |
getCgnType(String vouType) |
String |
getCGVNNumber(org.egov.commons.CVoucherHeader vh) |
org.egov.commons.dao.FinancialYearDAO |
getFinancialYearDAO() |
String |
getFiscalPeriod(String vDate) |
org.egov.commons.Functionary |
getFunctionaryByCode(BigDecimal code) |
protected List<String> |
getHeaderMandateFields() |
org.egov.infstr.services.PersistenceService |
getPersistenceService() |
org.egov.pims.commons.Position |
getPosition() |
protected void |
insertIntoVoucherHeader(org.egov.commons.CVoucherHeader vh) |
boolean |
isUniqueVN(String vcNum,
String vcDate) |
org.egov.commons.CVoucherHeader |
reverseVoucher(List<HashMap<String,Object>> paramList)
HashMap
|
void |
setAppConfigService(org.egov.infra.admin.master.service.AppConfigService appConfigService) |
void |
setAppConfigValuesService(org.egov.infra.admin.master.service.AppConfigValueService appConfigValuesService) |
void |
setFinancialYearDAO(org.egov.commons.dao.FinancialYearDAO financialYearDAO) |
void |
setPersistenceService(org.egov.infstr.services.PersistenceService persistenceService) |
void |
startWorkflow(ContraJournalVoucher cjv)
Deprecated.
|
void |
startWorkflow(org.egov.commons.CVoucherHeader voucherheader)
action name ////// check all junits, EisCommonsManger is added in create
voucher constructor voucher service need to pass
|
void |
startWorkflowForCashUpdate(org.egov.commons.CVoucherHeader voucherHeader)
only for contra workflow
|
void |
updatePJV(org.egov.commons.CVoucherHeader vh,
List<PreApprovedVoucher> detailList,
List<PreApprovedVoucher> subledgerlist) |
void |
validateBankDetails(HashMap<String,Object> receiptdetails) |
void |
validateInstrumentdetails(List<HashMap<String,Object>> instrumentdetailsList,
HashMap<String,Object> receiptdetails) |
void |
validateMandateFields(HashMap<String,Object> headerdetails) |
protected void |
validateMandotyFields(HashMap<String,Object> headerdetails) |
void |
validateReceiptDetails(HashMap<String,Object> receiptdetails) |
void |
validateTransaction(List<HashMap<String,Object>> accountcodedetails,
List<HashMap<String,Object>> subledgerdetails) |
void |
validateVoucherHeader(org.egov.commons.CVoucherHeader voucherHeader) |
void |
validateVoucherMIS(HashMap<String,Object> headerdetails)
This method will validate all the master data that are passed.
|
public long createVoucherFromBill(int billId,
String voucherStatus,
String voucherNumber,
Date voucherDate)
throws org.egov.infra.exception.ApplicationRuntimeException,
SQLException,
TaskFailedException
billId - voucherDate - TODOorg.egov.infra.exception.ApplicationRuntimeExceptionSQLExceptionExceptionTaskFailedExceptionpublic long createVoucherFromBillForPJV(int billId,
String voucherStatus,
List<PreApprovedVoucher> voucherdetailList,
List<PreApprovedVoucher> subLedgerList)
throws org.egov.infra.exception.ApplicationRuntimeException,
SQLException,
TaskFailedException
billId - org.egov.infra.exception.ApplicationRuntimeExceptionSQLExceptionExceptionTaskFailedExceptionpublic void createVoucherFromPreApprovedVoucher(long vouhcerheaderid,
String status)
throws org.egov.infra.exception.ApplicationRuntimeException
vouhcerheaderid - - the vouhcerheaderid of the preapproved voucher.status - - status of the vouchers.org.egov.infra.exception.ApplicationRuntimeException@Transactional public org.egov.commons.CVoucherHeader createPreApprovedVoucher(HashMap<String,Object> headerdetails, List<HashMap<String,Object>> accountcodedetails, List<HashMap<String,Object>> subledgerdetails) throws org.egov.infra.exception.ApplicationRuntimeException, org.egov.infra.validation.exception.ValidationException
headerdetails -
HashMap
vouchername -This will be the name of the voucher, will need
to set the values from enumeration (mandatory)
vouchertype -This will be the type of the voucher, will need
to set the values from enumeration (mandatory)
description -This will be the description of the voucher
(optional)
vouchernumber - This will be the vouchernumber if not set will
be populated (optional)
voucherdate - This is the date on which the voucher needs to
be created (mandatory)
fundid - This will be the id from the fund master (mandatory)
moduleid - This will be the id from module master,(not present
now). Any external system sending data needs to set the value
for this . If value not set will take as null (optional)
divisionid - This is the fieldid from the boundary master
(optional)
departmentid - This is the departmentid from the department
master (optional)
fundsourceid - This is the fundsourceid from the fund source
master (optional)
schemeid - This is the schemeid from the scheme master
(optional)
subschemeid - This is the subschemeid from the subscheme
master (optional)
status - This is the status of voucher . If not set will be
taken care (optional)
originalvoucher - This is the reference voucherid in care of
reversal voucher (optional)
refvoucher - This the reference voucherheaderid in case of
dependency vouchers (optional)
budgetCheckReq -Boolean- This is a flag set in vouchermis and
decided whether budget check should be done or not . 'true' is
yes 'false' is no . Default is 'true' (optional).
accountcodedetails -
HashMap
glcodeid - This the ledger codeid from the chartofaccounts
master. (mandatory)
debitamount - This is the debit amount for that voucher
(optional)
creditamount - This is the credit amount for that voucher
(optional)
functionid - This is the functionid from the function master
(optional)
narration -This is the narration if any for that account code
(optional)
subledgerdetails -
HashMap
glcodeid -This the ledger codeid from the chartofaccounts
master. (mandatory)
detailtypeid - This is the detailtypeid from the detailtype
object (mandatory)
detailkeyid - This is the detailkey from the detailkey object
(mandatory)
org.egov.infra.exception.ApplicationRuntimeExceptionorg.egov.infra.validation.exception.ValidationExceptionpublic void startWorkflow(org.egov.commons.CVoucherHeader voucherheader)
throws org.egov.infra.validation.exception.ValidationException
voucherheader - org.egov.infra.validation.exception.ValidationException@Deprecated public void startWorkflow(ContraJournalVoucher cjv) throws org.egov.infra.validation.exception.ValidationException
org.egov.infra.validation.exception.ValidationExceptionpublic void startWorkflowForCashUpdate(org.egov.commons.CVoucherHeader voucherHeader)
throws org.egov.infra.validation.exception.ValidationException
voucherHeader - org.egov.infra.validation.exception.ValidationException - Uses VoucherWorkflow since contra and brv workflows are samepublic org.egov.pims.commons.Position getPosition()
throws org.egov.infra.exception.ApplicationRuntimeException
org.egov.infra.exception.ApplicationRuntimeException@Transactional public org.egov.commons.CVoucherHeader createVoucher(HashMap<String,Object> headerdetails, List<HashMap<String,Object>> accountcodedetails, List<HashMap<String,Object>> subledgerdetails) throws org.egov.infra.exception.ApplicationRuntimeException
headerdetails -
HashMap
vouchername -This will be the name of the voucher, will need
to set the values from enumeration (mandatory)
vouchertype -This will be the type of the voucher, will need
to set the values from enumeration (mandatory)
description -This will be the description of the voucher
(optional)
vouchernumber - This will be the vouchernumber if not set will
be populated (optional)
voucherdate - This is the date on which the voucher needs to
be created (mandatory)
fundid - This will be the id from the fund master (mandatory)
functionid - This is the functionid from the function master
(optional)
moduleid - This will be the id from module master,(not present
now). Any external system sending data needs to set the value
for this . If value not set will take as null (optional)
divisionid - This is the fieldid from the boundary master
(optional)
departmentid - This is the departmentid from the department
master (optional)
fundsourceid - This is the fundsourceid from the fund source
master (optional)
schemeid - This is the schemeid from the scheme master
(optional)
subschemeid - This is the subschemeid from the subscheme
master (optional)
status - This is the status of voucher . If not set will be
taken care (optional)
originalvoucher - This is the reference voucherid in care of
reversal voucher (optional)
refvoucher - This the reference voucherheaderid in case of
dependency vouchers (optional)
vouchersubtype - This is the sub voucher type in case of
Journals where there are various kinds (optional)
budgetCheckReq -Boolean- This is a flag set in vouchermis and
decided whether budget check should be done or not . 'true' is
yes 'false' is no . Default is 'true' (optional).
billid-this is the bill number for which voucher is getting
created . (optional)
accountcodedetails -
HashMap
glcodeid - This the ledger codeid from the chartofaccounts
master. (mandatory)
debitamount - This is the debit amount for that voucher
(optional)
creditamount - This is the credit amount for that voucher
(optional)
functionid - This is the functionid from the function master
(optional)
narration -This is the narration if any for that account code
(optional)
subledgerdetails -
HashMap
glcodeid -This the ledger codeid from the chartofaccounts
master. (mandatory)
detailtypeid - This is the detailtypeid from the detailtype
object (mandatory)
detailkeyid - This is the detailkey from the detailkey object
(mandatory)
org.egov.infra.exception.ApplicationRuntimeExceptionprotected void insertIntoVoucherHeader(org.egov.commons.CVoucherHeader vh)
throws org.egov.infra.exception.ApplicationRuntimeException
org.egov.infra.exception.ApplicationRuntimeExceptionpublic void validateVoucherMIS(HashMap<String,Object> headerdetails) throws org.egov.infra.exception.ApplicationRuntimeException
headerdetails - org.egov.infra.exception.ApplicationRuntimeException@Transactional public org.egov.commons.CVoucherHeader createVoucherHeader(HashMap<String,Object> headerdetails) throws org.egov.infra.exception.ApplicationRuntimeException, Exception
org.egov.infra.exception.ApplicationRuntimeExceptionException@Transactional public org.egov.commons.Vouchermis createVouchermis(HashMap<String,Object> headerdetails) throws org.egov.infra.exception.ApplicationRuntimeException
org.egov.infra.exception.ApplicationRuntimeExceptionpublic void validateTransaction(List<HashMap<String,Object>> accountcodedetails, List<HashMap<String,Object>> subledgerdetails) throws org.egov.infra.exception.ApplicationRuntimeException, Exception
org.egov.infra.exception.ApplicationRuntimeExceptionExceptionpublic List<Transaxtion> createTransaction(HashMap<String,Object> headerdetails, List<HashMap<String,Object>> accountcodedetails, List<HashMap<String,Object>> subledgerdetails, org.egov.commons.CVoucherHeader vh) throws org.egov.infra.exception.ApplicationRuntimeException
org.egov.infra.exception.ApplicationRuntimeExceptionpublic org.egov.commons.Functionary getFunctionaryByCode(BigDecimal code)
public void validateVoucherHeader(org.egov.commons.CVoucherHeader voucherHeader)
public void validateInstrumentdetails(List<HashMap<String,Object>> instrumentdetailsList, HashMap<String,Object> receiptdetails)
instrumentdetails - public void updatePJV(org.egov.commons.CVoucherHeader vh,
List<PreApprovedVoucher> detailList,
List<PreApprovedVoucher> subledgerlist)
throws org.egov.infra.exception.ApplicationRuntimeException
org.egov.infra.exception.ApplicationRuntimeExceptionpublic void deleteVoucherdetailAndGL(org.egov.commons.CVoucherHeader vh)
throws SQLException,
org.egov.infra.exception.ApplicationRuntimeException
SQLExceptionorg.egov.infra.exception.ApplicationRuntimeException@Transactional public org.egov.commons.CVoucherHeader reverseVoucher(List<HashMap<String,Object>> paramList) throws org.egov.infra.exception.ApplicationRuntimeException, ParseException
Original voucher header id -long- is the voucher header id of the voucher to be reversed later callled originalvoucher
Reversal voucher name -String - name of the reversal voucher (mandatory)
Reversal voucher type -String - type of the reversal voucher (mandatory)
Reversal voucher date - Date('dd/MM/yyyy') date of the reversal vocuher
Reversal voucher number - String - voucher number of reversal voucher Newly created voucher is called reversal voucher
paramList - org.egov.infra.exception.ApplicationRuntimeExceptionParseExceptionprotected void checkMandatoryField(String fieldName, Object value, HashMap<String,Object> headerdetails, List<String> mandatoryFields)
public String getCGVNNumber(org.egov.commons.CVoucherHeader vh)
public org.egov.infra.admin.master.service.AppConfigService getAppConfigService()
public void setAppConfigService(org.egov.infra.admin.master.service.AppConfigService appConfigService)
public org.egov.infstr.services.PersistenceService getPersistenceService()
public void setPersistenceService(org.egov.infstr.services.PersistenceService persistenceService)
public org.egov.commons.dao.FinancialYearDAO getFinancialYearDAO()
public void setFinancialYearDAO(org.egov.commons.dao.FinancialYearDAO financialYearDAO)
public org.egov.infra.admin.master.service.AppConfigValueService getAppConfigValuesService()
public void setAppConfigValuesService(org.egov.infra.admin.master.service.AppConfigValueService appConfigValuesService)
public boolean isUniqueVN(String vcNum, String vcDate) throws Exception, TaskFailedException
ExceptionTaskFailedExceptionpublic String getFiscalPeriod(String vDate) throws TaskFailedException
TaskFailedExceptionCopyright © 2015–2017 eGovernments Foundation. All rights reserved.