Integration Documents Of Misc Receipt from Finance ERP

About:

Misc Receipt term refers to inventory that is received at a location from a source other than from a job or a purchase order. This is typically used for items that are used for often-repeated jobs or customer orders, where the desire is to keep a quantity of the item on hand for those purposes.

Implementation Steps:

  1. Miscellaneous Receipt Page.

  2. Create Miscellaneous Receipt.


Miscellaneous Create Receipt Page:

While Rendering the page for creating miscellaneous receipt the following operation is being performed to populate the following properties or fields at code level.

Receipt Date: this should be set as the current date.

Service Category : 

We are making a call to mdms for populating the service category data.

URI : https://egov-micro-dev.egovernments.org/egov-mdms-service/v1/_search

RequestBody : 

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": null

  },

  "MdmsCriteria": {

    "tenantId": "pb",

    "moduleDetails": [

      {

        "moduleName": "BillingService",

        "masterDetails": [

          {

            "name": "BusinessService",

            "filter": "[?(@.type in ['Finance'])]"

          }

        ]

      }

    ]

  }

}

ServiceType : 

This field will have data based on selection of Service Category Field.

If the service category will have the service sub category data then the service 

type data will be populated based on selection.

Post selection of Service Category and Service Type, one ajax call will be triggered to fetch the TaxHead Master Data. below is the mdms sample data to fetch the taxhead master data and the data will get populated in taxhead template to feed the amount.

URI   : https://egov-micro-dev.egovernments.org/egov-mdms-service/v1/_search

RequestBody : 

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": null

  },

  "MdmsCriteria": {

    "tenantId": "pb",

    "moduleDetails": [

      {

        "moduleName": "BillingService",

        "masterDetails": [

          {

            "name": "TaxHeadMaster",

            "filter": "[?(@.service in ['DISP_FIXED_ASSET.BUILDING'])]"

          }

        ]

      }

    ]

  }

}

Create Miscellaneous Receipt:

Post Filling the required form data when we will submit to create the miscellaneous receipt then the following operation would be performed at code level.

  • Prepare the consumer code based on service in the following format.

ServiceCategory-ServiceType-EpochDate

i.e REV_GRANTS-REV_GRANTS-1591905538436

  • Fetch the TaxPeriod for the selected service. refer rest call sample below.

  • Prepare the Demand Contract by setting consumer code, taxperiod etc.

  • Make the rest call to create the demand. refer rest call sample below.

  • Then make the rest call to generate the bill. Refer sample below.

  • Then finally make the rest call to generate the payment. Refer sample below.

  • And finally return the receipt number as a response.

  1. API sample to fetch the TaxPeriod

URI : https://egov-micro-dev.egovernments.org/billing-service/taxperiods/_search?tenantId=pb.jalandhar&service=REV_GRANTS

RequestBody :

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": null

  }

}

  • ---------------------------------------------------------------------------------------------------------------------



  1. API sample to Generate the Demand : 

URI : 

https://egov-micro-dev.egovernments.org/billing-service/demand/_create

RequestBody :

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": {

      "id": 26273,

      "uuid": "d8e2c1d7-fb2d-43ef-a7ce-708da88a7c41",

      "userName": "TEST-13",

      "name": "Atique",

      "type": "EMPLOYEE",

      "mobileNumber": null,

      "emailId": null,

      "roles": [],

      "tenantId": "pb.jalandhar"

    }

  },

  "Demands": [

    {

      "id": null,

      "tenantId": "pb.jalandhar",

      "consumerCode": "REV_GRANTS-REV_GRANTS-1591905538436",

      "consumerType": "MISCELLANEOUS_RECEIPT",

      "businessService": "REV_GRANTS",

      "payer": null,

      "taxPeriodFrom": 1554076801000,

      "taxPeriodTo": 1585699199000,

      "demandDetails": [

        {

          "id": null,

          "demandId": null,

          "taxHeadMasterCode": "REV_GRANTS_EDU_CESS_GRANTS",

          "taxAmount": 150,

          "collectionAmount": 0,

          "additionalDetails": null,

          "auditDetails": null,

          "tenantId": "pb.jalandhar"

        },

        {

          "id": null,

          "demandId": null,

          "taxHeadMasterCode": "REV_GRANTS_GOVT_AID_PRIM_EDU",

          "taxAmount": 265,

          "collectionAmount": 0,

          "additionalDetails": null,

          "auditDetails": null,

          "tenantId": "pb.jalandhar"

        },

        {

          "id": null,

          "demandId": null,

          "taxHeadMasterCode": "REV_GRANTS_FAM_WF_GRANT",

          "taxAmount": 185,

          "collectionAmount": 0,

          "additionalDetails": null,

          "auditDetails": null,

          "tenantId": "pb.jalandhar"

        },

        {

          "id": null,

          "demandId": null,

          "taxHeadMasterCode": "REV_GRANTS_FAM_PLANNIG_AID_CENT_GOVT",

          "taxAmount": 0,

          "collectionAmount": 0,

          "additionalDetails": null,

          "auditDetails": null,

          "tenantId": "pb.jalandhar"

        },

        {

          "id": null,

          "demandId": null,

          "taxHeadMasterCode": "REV_GRANTS_SJSRY_SAL_GRANT",

          "taxAmount": 0,

          "collectionAmount": 0,

          "additionalDetails": null,

          "auditDetails": null,

          "tenantId": "pb.jalandhar"

        }

      ],

      "auditDetails": null,

      "billExpiryTime": null,

      "additionalDetails": null,

      "minimumAmountPayable": 600,

      "status": null

    }

  ]

}

  • ---------------------------------------------------------------------------------------------------------------------

  1. API sample to Generate Bill : 

URI : 

https://egov-micro-dev.egovernments.org/billing-service/bill/v2/_fetchbill?tenantId=pb.jalandhar&businessService=REV_GRANTS&consumerCode=REV_GRANTS-REV_GRANTS-1591905538436

RequestBody :

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": {

      "id": 26273,

      "uuid": "d8e2c1d7-fb2d-43ef-a7ce-708da88a7c41",

      "userName": "TEST-13",

      "name": "Atique",

      "type": "EMPLOYEE",

      "mobileNumber": null,

      "emailId": null,

      "roles": [],

      "tenantId": "pb.jalandhar"

    }

  }

}

  • -------------------------------------------------------------------------------------------------------

  1. API sample to Generate Payment: 

URI : 

https://egov-micro-dev.egovernments.org/collection-services/payments/_create

RequestBody :

{

  "RequestInfo": {

    "apiId": null,

    "ver": null,

    "ts": null,

    "action": null,

    "did": null,

    "key": null,

    "msgId": null,

    "authToken": "9e6c9c1f-b553-449d-a897-8f71a4005bc4",

    "correlationId": null,

    "userInfo": {

      "id": 26273,

      "uuid": "d8e2c1d7-fb2d-43ef-a7ce-708da88a7c41",

      "userName": "TEST-13",

      "name": "Atique",

      "type": "EMPLOYEE",

      "mobileNumber": null,

      "emailId": null,

      "roles": [],

      "tenantId": "pb.jalandhar"

    }

  },

  "Payment": {

    "id": null,

    "tenantId": "pb.jalandhar",

    "totalDue": 600,

    "totalAmountPaid": 600,

    "transactionNumber": null,

    "transactionDate": 1591905559126,

    "paymentMode": "CASH",

    "instrumentDate": 1591905559126,

    "instrumentNumber": null,

    "instrumentStatus": "APPROVED",

    "ifscCode": null,

    "auditDetails": null,

    "additionalDetails": null,

    "paymentDetails": [

      {

        "id": null,

        "tenantId": "pb.jalandhar",

        "totalDue": 600,

        "totalAmountPaid": 600,

        "receiptNumber": null,

        "manualReceiptNumber": null,

        "manualReceiptDate": null,

        "receiptDate": null,

        "receiptType": null,

        "businessService": "REV_GRANTS",

        "billId": "87bd225a-d169-4ae0-b724-e18f3f2d67a8",

        "bill": null,

        "additionalDetails": null,

        "auditDetails": null

      }

    ],

    "paidBy": "Atique",

    "mobileNumber": null,

    "payerName": null,

    "payerAddress": null,

    "payerEmail": null,

    "payerId": null,

    "paymentStatus": "NEW"

  }

}

  • ---------------------------------------------------------------------------------------------------------------------