Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: JSON Mapping for ITC-04 filing #2273

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

Ninad1306
Copy link
Contributor

@Ninad1306 Ninad1306 commented Jun 21, 2024

Input:

{
    gstin: "24AABCD8856A8FG",
    fp: "172024",
    m2jw: [
        {
            jw_stcd: "27",
            chnum: "A4",
            chdt: "12-09-2017",
            itms: [
                {
                    goods_ty: "7b",
                    desc: "qwqwqwe",
                    uqc: "BTL",
                    qty: 1243,
                    txval: 10.2,
                    tx_c: 0,
                    tx_s: 0,
                    tx_i: 10,
                    tx_cs: 0,
                },
            ],
        },
    ],
    table5A: [
        {
            jw_stcd: "24",
            ctin: "24AABCD8856A8FG",
            items: [
                {
                    jw2_chdt: "12-06-2024",
                    o_chnum: "124",
                    uqc: "BAG",
                    o_chdt: "10-06-2024",
                    qty: 15,
                    nat_jw: "WORK",
                    jw2_chnum: "1236",
                    desc: "New -17",
                },
                {
                    jw2_chdt: "12-06-2024",
                    o_chnum: "124",
                    uqc: "BAG",
                    o_chdt: "10-06-2024",
                    qty: 10,
                    nat_jw: "WORK",
                    jw2_chnum: "1236",
                    desc: "New -18",
                },
            ],
        },
        {
            jw_stcd: "24",
            ctin: "24AABCD8856A8FG",
            items: [
                {
                    jw2_chdt: "12-06-2024",
                    o_chnum: "123",
                    uqc: "BAG",
                    o_chdt: "10-06-2024",
                    qty: 11,
                    nat_jw: "WORK",
                    jw2_chnum: "1236",
                    desc: "New -19",
                },
                {
                    jw2_chdt: "12-06-2024",
                    o_chnum: "123",
                    uqc: "BAG",
                    o_chdt: "10-06-2024",
                    qty: 12,
                    nat_jw: "WORK",
                    jw2_chnum: "1236",
                    desc: "New -16",
                },
            ],
        },
    ],
}

Output:

{
    "Table 5A": {
        "124 - 1236": {
            original_challan_number: "124",
            jw_challan_number: "1236",
            company_gstin: "24AABCD8856A8FG",
            jw_state_code: "24-Gujarat",
            items: [
                {
                    original_challan_date: "10-06-2024",
                    jw_challan_date: "12-06-2024",
                    nature_of_job: "WORK",
                    uom: "BAG-BAGS",
                    qty: 15.0,
                    desc: "New -17",
                },
                {
                    original_challan_date: "10-06-2024",
                    jw_challan_date: "12-06-2024",
                    nature_of_job: "WORK",
                    uom: "BAG-BAGS",
                    qty: 10.0,
                    desc: "New -18",
                },
            ],
        },
        "123 - 1235": {
            original_challan_number: "123",
            jw_challan_number: "1235",
            company_gstin: "24AABCD8856A8FG",
            jw_state_code: "24-Gujarat",
            items: [
                {
                    original_challan_date: "10-06-2024",
                    jw_challan_date: "12-06-2024",
                    nature_of_job: "WORK",
                    uom: "BAG-BAGS",
                    qty: 11.0,
                    desc: "New -19",
                },
                {
                    original_challan_date: "10-06-2024",
                    jw_challan_date: "12-06-2024",
                    nature_of_job: "WORK",
                    uom: "BAG-BAGS",
                    qty: 12.0,
                    desc: "New -16",
                },
            ],
        },
    },
    "Stock Entry": {
        A4: {
            jw_state_code: "27-Maharashtra",
            items: [
                {
                    taxable_value: 10.2,
                    igst_rate: 10,
                    cgst_rate: 0,
                    sgst_rate: 0,
                    cess_amount: 0,
                    uom: "BTL-BOTTLES",
                    qty: 1243.0,
                    desc: "qwqwqwe",
                    goods_type: "7b",
                },
            ],
            original_challan_number: "A4",
            original_challan_date: "12-09-2017",
            total_taxable_value: 10.2,
            total_igst_rate: 10,
            total_cgst_rate: 0,
            total_sgst_rate: 0,
            total_cess_amount: 0,
        },
    },
}

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 96.76259% with 9 lines in your changes missing coverage. Please review.

Project coverage is 59.94%. Comparing base (98e338c) to head (22ca60a).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
...mpliance/gst_india/utils/itc_04/itc_04_json_map.py 90.00% 8 Missing ⚠️
...compliance/gst_india/utils/itc_04/itc_04_export.py 98.41% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2273      +/-   ##
===========================================
+ Coverage    56.97%   59.94%   +2.97%     
===========================================
  Files          127      132       +5     
  Lines        12785    13128     +343     
===========================================
+ Hits          7284     7870     +586     
+ Misses        5501     5258     -243     
Files with missing lines Coverage Δ
india_compliance/gst_india/utils/__init__.py 76.87% <ø> (+0.57%) ⬆️
...mpliance/gst_india/utils/gstr_1/gstr_1_json_map.py 64.46% <100.00%> (-2.40%) ⬇️
...ia_compliance/gst_india/utils/gstr_mapper_utils.py 100.00% <100.00%> (ø)
...ndia_compliance/gst_india/utils/itc_04/__init__.py 100.00% <100.00%> (ø)
...a_compliance/gst_india/utils/itc_04/itc_04_data.py 100.00% <100.00%> (ø)
...compliance/gst_india/utils/itc_04/itc_04_export.py 98.41% <98.41%> (ø)
...mpliance/gst_india/utils/itc_04/itc_04_json_map.py 90.00% <90.00%> (ø)

... and 12 files with indirect coverage changes

Impacted file tree graph

@Ninad1306 Ninad1306 requested a review from vorasmit February 5, 2025 09:53
@Ninad1306 Ninad1306 force-pushed the itc_04_filing branch 2 times, most recently from 646fd3b to 2f6fb0b Compare February 6, 2025 05:15
@Ninad1306 Ninad1306 changed the title fix: JSON mapping for ITC-04 filing fix: JSON Mapping for ITC-04 filing Feb 6, 2025
@Ninad1306 Ninad1306 requested a review from ljain112 February 6, 2025 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants