Merge branch 'hotfix'
This commit is contained in:
commit
51eed9a128
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.1.4'
|
__version__ = '7.1.5'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -131,7 +131,8 @@ class RequestforQuotation(BuyingController):
|
|||||||
|
|
||||||
def send_email(self, data, sender, subject, message, attachments):
|
def send_email(self, data, sender, subject, message, attachments):
|
||||||
make(subject = subject, content=message,recipients=data.email_id,
|
make(subject = subject, content=message,recipients=data.email_id,
|
||||||
sender=sender,attachments = attachments, send_email=True)["name"]
|
sender=sender,attachments = attachments, send_email=True,
|
||||||
|
doctype=self.doctype, name=self.name)["name"]
|
||||||
|
|
||||||
frappe.msgprint(_("Email sent to supplier {0}").format(data.supplier))
|
frappe.msgprint(_("Email sent to supplier {0}").format(data.supplier))
|
||||||
|
|
||||||
|
@ -63,7 +63,10 @@ def setup_item():
|
|||||||
for i in items:
|
for i in items:
|
||||||
item = frappe.new_doc('Item')
|
item = frappe.new_doc('Item')
|
||||||
item.update(i)
|
item.update(i)
|
||||||
item.default_warehouse = frappe.get_all('Warehouse', filters={'warehouse_name': item.default_warehouse}, limit=1)[0].name
|
if item.default_warehouse:
|
||||||
|
warehouse = frappe.get_all('Warehouse', filters={'warehouse_name': item.default_warehouse}, limit=1)
|
||||||
|
if warehouse:
|
||||||
|
item.default_warehouse = warehouse[0].name
|
||||||
item.insert()
|
item.insert()
|
||||||
|
|
||||||
def setup_product_bundle():
|
def setup_product_bundle():
|
||||||
|
@ -41,9 +41,9 @@ def complete_setup(domain='Manufacturing'):
|
|||||||
setup_complete({
|
setup_complete({
|
||||||
"first_name": "Test",
|
"first_name": "Test",
|
||||||
"last_name": "User",
|
"last_name": "User",
|
||||||
"email": "test_demo@erpnext.com",
|
"email": "demo@erpnext.com",
|
||||||
"company_tagline": 'Awesome Products and Services',
|
"company_tagline": 'Awesome Products and Services',
|
||||||
"password": "test",
|
"password": "demo",
|
||||||
"fy_start_date": "2015-01-01",
|
"fy_start_date": "2015-01-01",
|
||||||
"fy_end_date": "2015-12-31",
|
"fy_end_date": "2015-12-31",
|
||||||
"bank_account": "National Bank",
|
"bank_account": "National Bank",
|
||||||
|
@ -85,9 +85,10 @@ def make_stock_reconciliation():
|
|||||||
|
|
||||||
def submit_draft_stock_entries():
|
def submit_draft_stock_entries():
|
||||||
from erpnext.stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, \
|
from erpnext.stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, \
|
||||||
DuplicateEntryForProductionOrderError, OperationsNotCompleteError
|
DuplicateEntryForProductionOrderError, OperationsNotCompleteError
|
||||||
|
|
||||||
# try posting older drafts (if exists)
|
# try posting older drafts (if exists)
|
||||||
|
frappe.db.commit()
|
||||||
for st in frappe.db.get_values("Stock Entry", {"docstatus":0}, "name"):
|
for st in frappe.db.get_values("Stock Entry", {"docstatus":0}, "name"):
|
||||||
try:
|
try:
|
||||||
ste = frappe.get_doc("Stock Entry", st[0])
|
ste = frappe.get_doc("Stock Entry", st[0])
|
||||||
|
BIN
erpnext/docs/assets/img/articles/withhold-1.png
Normal file
BIN
erpnext/docs/assets/img/articles/withhold-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
erpnext/docs/assets/img/articles/withhold-2.gif
Normal file
BIN
erpnext/docs/assets/img/articles/withhold-2.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 716 KiB |
@ -0,0 +1,37 @@
|
|||||||
|
#Adjust Withhold Amount in the Payment Entry
|
||||||
|
|
||||||
|
###Question
|
||||||
|
|
||||||
|
Let's assume that outstanding against a Sales Invoice is 20,000. When client makes payment, they will only pay 19,600. Rest 400 will be booked under Withhold account. How to manage this scenario in the Payment Entry.
|
||||||
|
|
||||||
|
###Answer
|
||||||
|
|
||||||
|
In the Payment Entry, you can mention Withhold Account in the Deductions or Loss table. Detailed steps below.
|
||||||
|
|
||||||
|
####Step 1: Setup Withhold Account
|
||||||
|
|
||||||
|
Create a Withhold Account in your Chart of Accounts master.
|
||||||
|
|
||||||
|
`Accounts > Chart of Accounts'
|
||||||
|
|
||||||
|
####Step 2: Payment Entry
|
||||||
|
|
||||||
|
To create Payment Entry, go to unpaid Sales Invoice and create click on Make Payment button.
|
||||||
|
|
||||||
|
#####Step 2.1: Enter Payment Amount
|
||||||
|
|
||||||
|
Enter Payment Amount as 19,600.
|
||||||
|
|
||||||
|
<img alt="Sales Invoice Payment Amount" class="screenshot" src="{{docs_base_url}}/assets/img/articles/withhold-1.png">
|
||||||
|
|
||||||
|
#####Step 2.2: Allocate Against Sales Invoice
|
||||||
|
|
||||||
|
Against Sales Invoice, allocate 20,000 (explained in GIF below).
|
||||||
|
|
||||||
|
#####Step 2.3: Add Deduction/Loss Account
|
||||||
|
|
||||||
|
You can notice that there is a difference of 400 in the Payment Amount and the Amount Allocated against Sales Invoice. You can book this difference account under Withhold Account.
|
||||||
|
|
||||||
|
<img alt="Deduction/Loss Account" class="screenshot" src="{{docs_base_url}}/assets/img/articles/withhold-2.gif">
|
||||||
|
|
||||||
|
Following same steps, you can also manage difference availed due to Currency Exchange Gain/Loss.
|
@ -11,4 +11,5 @@ post-dated-cheque-entry
|
|||||||
update-stock-option-in-sales-invoice
|
update-stock-option-in-sales-invoice
|
||||||
what-is-the-differences-of-total-and-valuation-in-tax-and-charges
|
what-is-the-differences-of-total-and-valuation-in-tax-and-charges
|
||||||
withdrawing-salary-from-owners-equity-account
|
withdrawing-salary-from-owners-equity-account
|
||||||
|
adjust-withhold-amount-payment-entry
|
||||||
c-form
|
c-form
|
@ -8,7 +8,7 @@ from frappe.utils import flt, cint, nowdate
|
|||||||
|
|
||||||
from frappe import throw, _
|
from frappe import throw, _
|
||||||
import frappe.defaults
|
import frappe.defaults
|
||||||
|
from frappe.utils import getdate
|
||||||
from erpnext.controllers.buying_controller import BuyingController
|
from erpnext.controllers.buying_controller import BuyingController
|
||||||
from erpnext.accounts.utils import get_account_currency
|
from erpnext.accounts.utils import get_account_currency
|
||||||
from frappe.desk.notifications import clear_doctype_notifications
|
from frappe.desk.notifications import clear_doctype_notifications
|
||||||
@ -59,7 +59,7 @@ class PurchaseReceipt(BuyingController):
|
|||||||
pc_obj = frappe.get_doc('Purchase Common')
|
pc_obj = frappe.get_doc('Purchase Common')
|
||||||
self.check_for_closed_status(pc_obj)
|
self.check_for_closed_status(pc_obj)
|
||||||
|
|
||||||
if self.posting_date > nowdate():
|
if getdate(self.posting_date) > getdate(nowdate()):
|
||||||
throw(_("Posting Date cannot be future date"))
|
throw(_("Posting Date cannot be future date"))
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class StockEntry(StockController):
|
|||||||
item.update(get_bin_details(item.item_code, item.s_warehouse))
|
item.update(get_bin_details(item.item_code, item.s_warehouse))
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
self.pro_doc = None
|
self.pro_doc = frappe._dict()
|
||||||
if self.production_order:
|
if self.production_order:
|
||||||
self.pro_doc = frappe.get_doc('Production Order', self.production_order)
|
self.pro_doc = frappe.get_doc('Production Order', self.production_order)
|
||||||
|
|
||||||
@ -582,7 +582,7 @@ class StockEntry(StockController):
|
|||||||
|
|
||||||
def set_production_order_details(self):
|
def set_production_order_details(self):
|
||||||
if not getattr(self, "pro_doc", None):
|
if not getattr(self, "pro_doc", None):
|
||||||
self.pro_doc = None
|
self.pro_doc = frappe._dict()
|
||||||
|
|
||||||
if self.production_order:
|
if self.production_order:
|
||||||
# common validations
|
# common validations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user