Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Objective (Problems and Goals)

  • To provide support for integration & validation of eway bill in softdata uplaod for various sources Solution

2. Initiation

Title 

Eway Bill Vaidation

Author(s)

Titunath

Team (POD)

Brahmos

Reviewer(s)

Suraj

Last Updated On

Epic, ticket, issue, or LPP reference link

3. Solution

...

  • In projectx -

  • create two generic master can be updated from ops dashboard. - To be added in mongo MiscReasons Skip HSN Master ( type name -> skip_hsn_master )
    EWB State Wise Master
    These master can be updated from frontend dashboard
    Frontend

...

  • ( type name -> ewb_state_wise_master) -

    • Commmon changes for all sources -
      If eway bill provided we will validate it using dtdc api.
      - For INTL use case HSN master will not be applicable.
      - EWB state master - Check threhold value - id declared value > threshold value - ewb number ius required
      if CN is INTL we will consider inter state value (as destination state will be out of country)

  • Changes in sources -
    Customer portal (single, Excel ) -
    Softdata api - PUDO (single, fast e forward ) -
    Coordinator portal

3.2 Approach and Components

  1. Approach:

  • Create new key to toggle this feature for backward compatibility - eway_bill_config.use_ewb_validation_in_softdata -

  • Create function to validate eway bill if key is enabled.
    - validateEwayBill in pX
    - if EWB bill is required - decalred value > applicable range.
    - Check if hsn is provided
    - if provided validate

  • if ewb is skippable.
    - if skippable and ewb is not provided then proceed.
    - if hsn not provided and ewb is required throw error.
    - This function will be controller as well which will be called from
    api (from v1 and V2) - /validateEwayBill ( px endpoint to be called from pudo, v2)
    Changes
    - changes in V1 parcel.js Add function validateEwayBill
    - It will call px api to validate eway bill via dtdc api for pudo booking.
    - changes in V2 Changes in validateForCtbs ( to be placed separately )
    Add function validateEwayBill - It will call px api.

    • Changes for mobile api. - this new api will tell whether eway bill is required for consignment creation or not
      URL -> RiderApp/consignment/isEwayBillMandatory method
      -> post payload
      -> { "origin_state_id": "",
      "destination_state_id": "",
      "declared_value": "",
      "is_international": true/false,
      "hsn_code": "", // optional }

      sample response

    • { thresholdValue: 50000, ewaybill_required: true }


      these two values can be used on frontend to mandate eway bill or pass hsn code instead .
      these values to be passed in consignment creation api ( to be added ) for further validation of eway bill number via dtdc api.

      In paperworks_config keys need to be added (need to be updated)

  1. Database Migration and Index Changes:

  2. Org Config:

  3. Code Writing Style:

  4. API Documentation:

    1. Endpoint:

    2. Method:

    3. Fields/Payload:

    4. Response:

    5. Logic:

  5. Assumptions:

3.2 Dev Test Cases

Function/Feature

 Scenario

 Expected Outcome

 

 

 

 

 

 

3.3 Impact Analysis

3.4 Security and Permissions

3.5 Notes (If any)