refactor: revert indentation

(cherry picked from commit 063c4e9720)
This commit is contained in:
Karm Soni
2025-07-17 15:39:12 +05:30
committed by Mergify
parent a1aee44014
commit fb81202830

View File

@@ -56,12 +56,12 @@ def make_sl_entries(sl_entries, allow_negative_stock=False, via_landed_cost_vouc
"""Create SL entries from SL entry dicts """Create SL entries from SL entry dicts
args: args:
- allow_negative_stock: disable negative stock valiations if true - allow_negative_stock: disable negative stock valiations if true
- via_landed_cost_voucher: landed cost voucher cancels and reposts - via_landed_cost_voucher: landed cost voucher cancels and reposts
entries of purchase document. This flag is used to identify if entries of purchase document. This flag is used to identify if
cancellation and repost is happening via landed cost voucher, in cancellation and repost is happening via landed cost voucher, in
such cases certain validations need to be ignored (like negative such cases certain validations need to be ignored (like negative
stock) stock)
""" """
from erpnext.controllers.stock_controller import future_sle_exists from erpnext.controllers.stock_controller import future_sle_exists
@@ -526,12 +526,12 @@ class update_entries_after:
:param args: args as dict :param args: args as dict
args = { args = {
"item_code": "ABC", "item_code": "ABC",
"warehouse": "XYZ", "warehouse": "XYZ",
"posting_date": "2012-12-12", "posting_date": "2012-12-12",
"posting_time": "12:00" "posting_time": "12:00"
} }
""" """
def __init__( def __init__(
@@ -599,15 +599,15 @@ class update_entries_after:
:Data Structure: :Data Structure:
self.data = { self.data = {
warehouse1: { warehouse1: {
'previus_sle': {}, 'previus_sle': {},
'qty_after_transaction': 10, 'qty_after_transaction': 10,
'valuation_rate': 100, 'valuation_rate': 100,
'stock_value': 1000, 'stock_value': 1000,
'prev_stock_value': 1000, 'prev_stock_value': 1000,
'stock_queue': '[[10, 100]]', 'stock_queue': '[[10, 100]]',
'stock_value_difference': 1000 'stock_value_difference': 1000
} }
} }
""" """
@@ -1644,11 +1644,11 @@ def get_previous_sle(args, for_update=False, extra_cond=None):
is called from various transaction like stock entry, reco etc is called from various transaction like stock entry, reco etc
args = { args = {
"item_code": "ABC" or ["ABC", "XYZ"], "item_code": "ABC",
"warehouse": "XYZ" or ["XYZ", "ABC"], "warehouse": "XYZ",
"posting_date": "2012-12-12", "posting_date": "2012-12-12",
"posting_time": "12:00", "posting_time": "12:00",
"sle": "name of reference Stock Ledger Entry" "sle": "name of reference Stock Ledger Entry"
} }
""" """
args["name"] = args.get("sle", None) or "" args["name"] = args.get("sle", None) or ""