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: internal Purchase Receipt GL Entries #34912

Merged
merged 5 commits into from
Apr 20, 2023

Conversation

s-aga-r
Copy link
Contributor

@s-aga-r s-aga-r commented Apr 18, 2023

Source / Ref: ISS-23-24-00229

Steps to replicate:

  • Create Delivery Note [Internal] -> Purchase Receipt.
  • Create back-date Stock Reconciliation [After DN and Before PR] to update the Valuation Rate of Items in the In-Transit Warehouse.
  • Complete Repost Item Valuation.
  • Check the Stock Ledger and GL Ledger for PR, the GL Entries shows the difference.

Before:

image

image

image

After:

image

image

image

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #34912 (e1f5a5a) into develop (fc6486d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #34912   +/-   ##
========================================
  Coverage    63.87%   63.87%           
========================================
  Files          810      810           
  Lines        59750    59750           
========================================
+ Hits         38166    38167    +1     
+ Misses       21584    21583    -1     
Impacted Files Coverage Δ
...stock/doctype/purchase_receipt/purchase_receipt.py 92.69% <100.00%> (+0.22%) ⬆️

@s-aga-r s-aga-r added the backport version-14-hotfix backport to version 14 label Apr 20, 2023
@s-aga-r s-aga-r marked this pull request as ready for review April 20, 2023 05:30
@s-aga-r s-aga-r merged commit 6f26044 into frappe:develop Apr 20, 2023
rohitwaghchaure added a commit that referenced this pull request Apr 20, 2023
…-34912

fix: internal Purchase Receipt GL Entries (backport #34912)
s-aga-r added a commit that referenced this pull request Apr 20, 2023
…-34912

fix: internal Purchase Receipt GL Entries (backport #34912)
@priteshsuthar
Copy link

priteshsuthar commented May 3, 2023

@s-aga-r
Internal Purchase Receipt has stopped working after latest release, while submitting doc it throws error as below

App Versions

{
	"amrut_crm": "0.0.1",
	"amrut_energy": "0.0.1",
	"callyzer_integration": "0.0.1",
	"camsunit_integration": "0.0.1",
	"erpnext": "14.23.0",
	"frappe": "14.34.0",
	"hrms": "14.2.3",
	"india_compliance": "14.6.1",
	"indiamart_integration": "0.0.2",
	"my_operator": "0.0.1",
	"payments": "0.0.1",
	"wati_whatsapp": "0.0.1",
	"wms_mobile": "0.0.1"
}

Route

Form/Purchase Receipt/PRWB2324-07

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 66, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1607, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 26, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 356, in _save
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1085, in run_post_save_methods
    self.run_method("on_submit")
  File "apps/frappe/frappe/model/document.py", line 914, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1264, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1246, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 911, in fn
    return method_object(*args, **kwargs)
  File "apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 250, in on_submit
    self.make_gl_entries()
  File "apps/erpnext/erpnext/controllers/stock_controller.py", line 73, in make_gl_entries
    gl_entries = self.get_gl_entries(warehouse_account)
  File "apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 295, in get_gl_entries
    self.make_item_gl_entries(gl_entries, warehouse_account=warehouse_account)
  File "apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py", line 383, in make_item_gl_entries
    outgoing_amount = abs(
TypeError: bad operand type for abs(): 'NoneType'

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"name\":\"PRWB2324-07\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":0,\"title\":\"Amrut Energy Private Limited\",\"naming_series\":\"PRWB2324-.##\",\"supplier\":\"Amrut Energy Private Limited\",\"supplier_name\":\"Amrut Energy Private Limited\",\"supplier_delivery_note\":\"DN2324-206\",\"posting_date\":\"2023-05-01\",\"posting_time\":\"13:23:42\",\"set_posting_time\":1,\"company\":\"Amrut Energy Pvt Ltd WB\",\"apply_putaway_rule\":0,\"is_return\":0,\"cost_center\":\"Main - WBAE\",\"currency\":\"INR\",\"conversion_rate\":1,\"buying_price_list\":\"Standard Selling\",\"price_list_currency\":\"INR\",\"plc_conversion_rate\":1,\"ignore_pricing_rule\":0,\"set_warehouse\":\"Siliguri - WBAE\",\"is_subcontracted\":0,\"total_qty\":60,\"total_net_weight\":0,\"base_total\":381000,\"base_net_total\":381000,\"total\":381000,\"net_total\":381000,\"tax_category\":\"\",\"taxes_and_charges\":\"Input GST Out-state - WBAE\",\"base_taxes_and_charges_added\":55500,\"base_taxes_and_charges_deducted\":0,\"base_total_taxes_and_charges\":55500,\"taxes_and_charges_added\":55500,\"taxes_and_charges_deducted\":0,\"total_taxes_and_charges\":55500,\"base_grand_total\":436500,\"base_rounding_adjustment\":0,\"base_rounded_total\":0,\"base_in_words\":\"\",\"grand_total\":436500,\"rounding_adjustment\":0,\"rounded_total\":0,\"in_words\":\"\",\"disable_rounded_total\":1,\"apply_discount_on\":\"Grand Total\",\"base_discount_amount\":0,\"additional_discount_percentage\":0,\"discount_amount\":0,\"other_charges_calculation\":\"<div class=\\\"tax-break-up\\\" style=\\\"overflow-x: auto;\\\">\\n\\t<table class=\\\"table table-bordered table-hover\\\">\\n\\t\\t<thead>\\n\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-left\\\">HSN/SAC</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-right\\\">Taxable Amount</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t<th class=\\\"text-right\\\">Input Tax IGST @ 18.0</th>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t</tr>\\n\\t\\t</thead>\\n\\t\\t<tbody>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>84137010</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 1,58,000.00\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(18.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 28,440.00\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>85044090</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 2,18,000.00\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(12.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 26,160.00\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t\\t\\t<tr>\\n\\t\\t\\t\\t\\t<td>90261090</td>\\n\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t₹ 5,000.00\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t<td class=\\\"text-right\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(18.0%)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t₹ 900.00\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t</td>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</tr>\\n\\t\\t\\t\\n\\t\\t</tbody>\\n\\t</table>\\n</div>\",\"supplier_address\":\"Amrut Energy Private Limited\",\"address_display\":\"B-1308, Empire Business Hub<br>Science city road,Sola<br>Ahmedabad<br>\\nGujarat, State Code: 24<br>PIN: 380060<br>India<br>\\nPhone: 079 48991308<br>Email: info@amrutenergy.com<br>GSTIN: 24AAOCA6660R1ZX<br>\",\"supplier_gstin\":\"24AAOCA6660R1ZX\",\"gst_category\":\"Registered Regular\",\"shipping_address\":\"Amrut Energy Pvt Ltd SLG-Warehouse\",\"shipping_address_display\":\"Mittal Complex, 2nd Mile,<br>Sevoke Road, Ward Number 13,<br>Siliguri<br>\\nWest Bengal, State Code: 19<br>PIN: 734001<br>India<br>\\nGSTIN: 19AAOCA6660R1ZO<br>\",\"billing_address\":\"Amrut Energy Pvt Ltd SLG-Warehouse\",\"billing_address_display\":\"Mittal Complex, 2nd Mile,<br>Sevoke Road, Ward Number 13,<br>Siliguri<br>\\nWest Bengal, State Code: 19<br>PIN: 734001<br>India<br>\\nGSTIN: 19AAOCA6660R1ZO<br>\",\"company_gstin\":\"19AAOCA6660R1ZO\",\"place_of_supply\":\"19-West Bengal\",\"tc_name\":\"Invoice T&C\",\"terms\":\"<div class=\\\"ql-editor read-mode\\\"><p><strong>Declaration</strong></p><p>1. Goods once sold will not be taken back.</p><p>2. Bills not paid on due date will attract 24% p.a. interest.</p><p>3. Customers are requested to inspect the materials there and then at the final delivery point, as any specification, quality or physical damage claims must be reported at the final delivery point.</p><p>4. We declare that this invoice shows the actual price of the goods described and all particulars are correct.</p><p><br></p><p><strong>Company's Bank Details</strong></p><p><strong>Bank Name:</strong> : State Bank Of India</p><p><strong>A/c No.:</strong> 41200224836</p><p><strong>IFSC: </strong>SBIN0003993</p><p><strong>Branch:</strong> : SME Laghu Udyog Branch, Gandhi Gram Railway Station-380009</p><p style=\\\"text-align: right;\\\">For Amrut Energy Pvt Ltd</p><p><br></p><p style=\\\"text-align: right;\\\">Authorized Signatory</p><p style=\\\"text-align: center;\\\">Subject to Ahmedabad Jurisdiction</p><p style=\\\"text-align: center;\\\">This is Computer Generated Invoice</p></div>\",\"status\":\"Draft\",\"per_billed\":0,\"per_returned\":0,\"letter_head\":\"Standard\",\"group_same_items\":0,\"language\":\"en\",\"transporter_name\":\"Delhivery Private Limited\",\"is_internal_supplier\":1,\"represents_company\":\"Amrut Energy Pvt Ltd\",\"is_old_subcontracting_flow\":0,\"is_reverse_charge\":0,\"doctype\":\"Purchase Receipt\",\"items\":[{\"name\":\"956605594f\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":1,\"has_item_scanned\":0,\"item_code\":\"SP1D1B/12\",\"item_name\":\"1 hp 160 V Noryl V4 Solar Submersible Pump Set 12 Stage\",\"description\":\"<div>1 hp 160 V Noryl V4 Solar Submersible Pump Set 12 Stage</div>\",\"gst_hsn_code\":\"84137010\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Pump-Set\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":6028.68,\"base_price_list_rate\":6028.68,\"margin_type\":\"Amount\",\"margin_rate_or_amount\":1871.32,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":-1871.32,\"base_rate_with_margin\":0,\"rate\":7900,\"amount\":158000,\"base_rate\":7900,\"base_amount\":158000,\"stock_uom_rate\":7900,\"is_free_item\":0,\"net_rate\":7900,\"net_amount\":158000,\"item_tax_template\":\"GST 18% - WBAE\",\"base_net_rate\":7900,\"base_net_amount\":158000,\"valuation_rate\":7900,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-05-08\",\"allow_zero_valuation_rate\":0,\"serial_no\":\"P23D0550\\nP23D0532\\nP23D0521\\nP23D0524\\nP23D0538\\nP23D0540\\nP23D0534\\nP23D0535\\nP23D0549\\nP23D0548\\nP23D0544\\nP23D0541\\nP23D0546\\nP23D0547\\nP23D0526\\nP23D0525\\nP23D0536\\nP23D0528\\nP23D0515\\nP23D0514\",\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 9.0, \\\"Output Tax CGST - WBAE\\\": 9.0, \\\"Output Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST - WBAE\\\": 9.0, \\\"Input Tax CGST - WBAE\\\": 9.0, \\\"Input Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST RCM - WBAE\\\": 9.0, \\\"Input Tax CGST RCM - WBAE\\\": 9.0, \\\"Input Tax IGST RCM - WBAE\\\": 18.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"},{\"name\":\"0478ef3cdf\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":2,\"has_item_scanned\":0,\"item_code\":\"C1FG\",\"item_name\":\"1 hp Frecon Controller Solar & Grid\",\"description\":\"<div><p>1 hp Controller Solar &amp; Grid</p></div>\",\"gst_hsn_code\":\"85044090\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Pump-Controller\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":11600,\"base_price_list_rate\":11600,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":6.034,\"discount_amount\":700,\"base_rate_with_margin\":0,\"rate\":10900,\"amount\":218000,\"base_rate\":10900,\"base_amount\":218000,\"stock_uom_rate\":10900,\"is_free_item\":0,\"net_rate\":10900,\"net_amount\":218000,\"item_tax_template\":\"GST 12% - WBAE\",\"base_net_rate\":10900,\"base_net_amount\":218000,\"valuation_rate\":10900,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-06-10\",\"allow_zero_valuation_rate\":0,\"serial_no\":\"C1H01180842221004758\\nC1H01180842221004573\\nC1H01180842221004497\\nC1H01180842221006511\\nC1H01180842221006423\\nC1H01180842221004400\\nC1H01180848210703464\\nC1H01180842221004510\\nC1H01180842221006424\\nC1H01180842221006509\\nC1H01180842221004596\\nC1H01180842221004467\\nC1H01180842221006512\\nC1F230300389\\nC1F230300074\\nC1F230300157\\nC1F230300114\\nC1F230300088\\nC1F230300390\\nC1F230300163\",\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 6.0, \\\"Output Tax CGST - WBAE\\\": 6.0, \\\"Output Tax IGST - WBAE\\\": 12.0, \\\"Input Tax SGST - WBAE\\\": 6.0, \\\"Input Tax CGST - WBAE\\\": 6.0, \\\"Input Tax IGST - WBAE\\\": 12.0, \\\"Input Tax SGST RCM - WBAE\\\": 6.0, \\\"Input Tax CGST RCM - WBAE\\\": 6.0, \\\"Input Tax IGST RCM - WBAE\\\": 12.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"},{\"name\":\"ea7458e412\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":3,\"has_item_scanned\":0,\"item_code\":\"FL\",\"item_name\":\"Float Switch\",\"description\":\"Float Switch\",\"gst_hsn_code\":\"90261090\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Controller Raw Materials\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":250,\"base_price_list_rate\":250,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":250,\"amount\":5000,\"base_rate\":250,\"base_amount\":5000,\"stock_uom_rate\":250,\"is_free_item\":0,\"net_rate\":250,\"net_amount\":5000,\"item_tax_template\":\"GST 18% - WBAE\",\"base_net_rate\":250,\"base_net_amount\":5000,\"valuation_rate\":250,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-05-11\",\"allow_zero_valuation_rate\":0,\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 9.0, \\\"Output Tax CGST - WBAE\\\": 9.0, \\\"Output Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST - WBAE\\\": 9.0, \\\"Input Tax CGST - WBAE\\\": 9.0, \\\"Input Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST RCM - WBAE\\\": 9.0, \\\"Input Tax CGST RCM - WBAE\\\": 9.0, \\\"Input Tax IGST RCM - WBAE\\\": 18.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"}],\"supplied_items\":[],\"taxes\":[{\"name\":\"2c607a693c\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":1,\"category\":\"Total\",\"add_deduct_tax\":\"Add\",\"charge_type\":\"On Net Total\",\"included_in_print_rate\":0,\"included_in_paid_amount\":0,\"account_head\":\"Input Tax IGST - WBAE\",\"description\":\"Input Tax IGST @ 18.0\",\"rate\":0,\"cost_center\":\"Main - WBAE\",\"account_currency\":\"INR\",\"tax_amount\":55500,\"tax_amount_after_discount_amount\":55500,\"total\":436500,\"base_tax_amount\":55500,\"base_total\":436500,\"base_tax_amount_after_discount_amount\":55500,\"item_wise_tax_detail\":\"{\\\"SP1D1B/12\\\":[18,28440],\\\"C1FG\\\":[12,26160],\\\"FL\\\":[18,900]}\",\"parent\":\"PRWB2324-07\",\"parentfield\":\"taxes\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Taxes and Charges\"}],\"pricing_rules\":[],\"__onload\":{\"make_payment_via_journal_entry\":0,\"backflush_based_on\":\"Material Transferred for Subcontract\"},\"__last_sync_on\":\"2023-05-03T09:37:35.625Z\",\"_items\":[{\"name\":\"956605594f\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":1,\"has_item_scanned\":0,\"item_code\":\"SP1D1B/12\",\"item_name\":\"1 hp 160 V Noryl V4 Solar Submersible Pump Set 12 Stage\",\"description\":\"<div>1 hp 160 V Noryl V4 Solar Submersible Pump Set 12 Stage</div>\",\"gst_hsn_code\":\"84137010\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Pump-Set\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":6028.68,\"base_price_list_rate\":6028.68,\"margin_type\":\"Amount\",\"margin_rate_or_amount\":1871.32,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":-1871.32,\"base_rate_with_margin\":0,\"rate\":7900,\"amount\":158000,\"base_rate\":7900,\"base_amount\":158000,\"stock_uom_rate\":7900,\"is_free_item\":0,\"net_rate\":7900,\"net_amount\":158000,\"item_tax_template\":\"GST 18% - WBAE\",\"base_net_rate\":7900,\"base_net_amount\":158000,\"valuation_rate\":7900,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-05-08\",\"allow_zero_valuation_rate\":0,\"serial_no\":\"P23D0550\\nP23D0532\\nP23D0521\\nP23D0524\\nP23D0538\\nP23D0540\\nP23D0534\\nP23D0535\\nP23D0549\\nP23D0548\\nP23D0544\\nP23D0541\\nP23D0546\\nP23D0547\\nP23D0526\\nP23D0525\\nP23D0536\\nP23D0528\\nP23D0515\\nP23D0514\",\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 9.0, \\\"Output Tax CGST - WBAE\\\": 9.0, \\\"Output Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST - WBAE\\\": 9.0, \\\"Input Tax CGST - WBAE\\\": 9.0, \\\"Input Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST RCM - WBAE\\\": 9.0, \\\"Input Tax CGST RCM - WBAE\\\": 9.0, \\\"Input Tax IGST RCM - WBAE\\\": 18.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"},{\"name\":\"0478ef3cdf\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":2,\"has_item_scanned\":0,\"item_code\":\"C1FG\",\"item_name\":\"1 hp Frecon Controller Solar & Grid\",\"description\":\"<div><p>1 hp Controller Solar &amp; Grid</p></div>\",\"gst_hsn_code\":\"85044090\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Pump-Controller\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":11600,\"base_price_list_rate\":11600,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":6.034,\"discount_amount\":700,\"base_rate_with_margin\":0,\"rate\":10900,\"amount\":218000,\"base_rate\":10900,\"base_amount\":218000,\"stock_uom_rate\":10900,\"is_free_item\":0,\"net_rate\":10900,\"net_amount\":218000,\"item_tax_template\":\"GST 12% - WBAE\",\"base_net_rate\":10900,\"base_net_amount\":218000,\"valuation_rate\":10900,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-06-10\",\"allow_zero_valuation_rate\":0,\"serial_no\":\"C1H01180842221004758\\nC1H01180842221004573\\nC1H01180842221004497\\nC1H01180842221006511\\nC1H01180842221006423\\nC1H01180842221004400\\nC1H01180848210703464\\nC1H01180842221004510\\nC1H01180842221006424\\nC1H01180842221006509\\nC1H01180842221004596\\nC1H01180842221004467\\nC1H01180842221006512\\nC1F230300389\\nC1F230300074\\nC1F230300157\\nC1F230300114\\nC1F230300088\\nC1F230300390\\nC1F230300163\",\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 6.0, \\\"Output Tax CGST - WBAE\\\": 6.0, \\\"Output Tax IGST - WBAE\\\": 12.0, \\\"Input Tax SGST - WBAE\\\": 6.0, \\\"Input Tax CGST - WBAE\\\": 6.0, \\\"Input Tax IGST - WBAE\\\": 12.0, \\\"Input Tax SGST RCM - WBAE\\\": 6.0, \\\"Input Tax CGST RCM - WBAE\\\": 6.0, \\\"Input Tax IGST RCM - WBAE\\\": 12.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"},{\"name\":\"ea7458e412\",\"owner\":\"amrutenergy@amrutenergy.com\",\"creation\":\"2023-05-01 13:24:59.138440\",\"modified\":\"2023-05-01 13:27:34.539451\",\"modified_by\":\"amrutenergy@amrutenergy.com\",\"docstatus\":0,\"idx\":3,\"has_item_scanned\":0,\"item_code\":\"FL\",\"item_name\":\"Float Switch\",\"description\":\"Float Switch\",\"gst_hsn_code\":\"90261090\",\"is_nil_exempt\":0,\"is_non_gst\":0,\"item_group\":\"Controller Raw Materials\",\"image\":\"\",\"received_qty\":20,\"qty\":20,\"rejected_qty\":0,\"uom\":\"Nos\",\"stock_uom\":\"Nos\",\"conversion_factor\":1,\"retain_sample\":0,\"sample_quantity\":0,\"received_stock_qty\":20,\"stock_qty\":20,\"returned_qty\":0,\"price_list_rate\":250,\"base_price_list_rate\":250,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":250,\"amount\":5000,\"base_rate\":250,\"base_amount\":5000,\"stock_uom_rate\":250,\"is_free_item\":0,\"net_rate\":250,\"net_amount\":5000,\"item_tax_template\":\"GST 18% - WBAE\",\"base_net_rate\":250,\"base_net_amount\":5000,\"valuation_rate\":250,\"item_tax_amount\":0,\"rm_supp_cost\":0,\"landed_cost_voucher_amount\":0,\"rate_difference_with_purchase_invoice\":0,\"billed_amt\":0,\"warehouse\":\"Siliguri - WBAE\",\"is_fixed_asset\":0,\"schedule_date\":\"2023-05-11\",\"allow_zero_valuation_rate\":0,\"include_exploded_items\":0,\"item_tax_rate\":\"{\\\"Output Tax SGST - WBAE\\\": 9.0, \\\"Output Tax CGST - WBAE\\\": 9.0, \\\"Output Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST - WBAE\\\": 9.0, \\\"Input Tax CGST - WBAE\\\": 9.0, \\\"Input Tax IGST - WBAE\\\": 18.0, \\\"Input Tax SGST RCM - WBAE\\\": 9.0, \\\"Input Tax CGST RCM - WBAE\\\": 9.0, \\\"Input Tax IGST RCM - WBAE\\\": 18.0}\",\"weight_per_unit\":0,\"total_weight\":0,\"expense_account\":\"Cost of Goods Sold - WBAE\",\"cost_center\":\"Main - WBAE\",\"page_break\":0,\"parent\":\"PRWB2324-07\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Receipt\",\"doctype\":\"Purchase Receipt Item\"}]}",
		"action": "Submit"
	},
	"btn": {
		"jQuery360078729749333046661": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 34593,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
	"exception": "TypeError: bad operand type for abs(): 'NoneType'"
}

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants