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

chore: added comments to purchase_receipt.py and stock_entry.py #1279

Merged
merged 2 commits into from
May 20, 2021
Merged

chore: added comments to purchase_receipt.py and stock_entry.py #1279

merged 2 commits into from
May 20, 2021

Conversation

MyuddinKhatri
Copy link

Ref: Asana

@hrwX hrwX changed the title fix: added docstring to purchase_receipt.py and stock_entry.py chore: added comments to purchase_receipt.py and stock_entry.py May 12, 2021
hrwX
hrwX previously approved these changes May 12, 2021
@@ -217,6 +217,7 @@ def get_current_stock(self):
d.current_stock = bin and flt(bin[0]['actual_qty']) or 0

def update_batch_with_supplier(self):
# update batch doc with supplier if batch doc don't have supplier

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is pretty useless, it does nothing that the function header does not already explain.

@@ -691,6 +691,7 @@ def update_stock_ledger(self):
self.make_sl_entries(sl_entries, self.amended_from and 'Yes' or 'No')

def update_batch_with_customer_provided_item(self):
# update batch doc with provided by customer if batch doc don't have provided by customer

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same case here, comment is useless.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify that is is being done only when the stock entry is a "Material Receipt". Each of the "if" statements should have a comment before explaining the purpose of the cases. The logic of the function should be visible in the comments.

@sahil28297 sahil28297 merged commit a6ff75b into Bloomstack:bs-may-sprint-1 May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants