Compare commits

..

20 Commits

Author SHA1 Message Date
Frappe PR Bot
983c2133c2 chore(release): Bumped to Version 13.54.14
## [13.54.14](https://github.com/frappe/erpnext/compare/v13.54.13...v13.54.14) (2023-11-29)

### Bug Fixes

* patch - Duplicate entry quality inspection parameter (backport [#38262](https://github.com/frappe/erpnext/issues/38262)) ([#38265](https://github.com/frappe/erpnext/issues/38265)) ([095d99d](095d99dbd2))
* precision for invoice outstandings ([#38323](https://github.com/frappe/erpnext/issues/38323)) ([190f77a](190f77abff))
2023-11-29 04:55:27 +00:00
Deepesh Garg
a76c6ab042 Merge pull request #38385 from frappe/version-13-hotfix
chore: release v13
2023-11-29 10:24:11 +05:30
Frappe PR Bot
a37bdb54cd chore(release): Bumped to Version 13.54.13
## [13.54.13](https://github.com/frappe/erpnext/compare/v13.54.12...v13.54.13) (2023-11-22)

### Bug Fixes

* patch - Duplicate entry quality inspection parameter (backport [#38262](https://github.com/frappe/erpnext/issues/38262)) (backport [#38265](https://github.com/frappe/erpnext/issues/38265)) ([#38266](https://github.com/frappe/erpnext/issues/38266)) ([b28e29c](b28e29cab1))
2023-11-22 08:53:41 +00:00
mergify[bot]
b28e29cab1 fix: patch - Duplicate entry quality inspection parameter (backport #38262) (backport #38265) (#38266)
fix: patch - Duplicate entry quality inspection parameter (backport #38262) (#38265)

fix: patch - Duplicate entry quality inspection parameter (#38262)

(cherry picked from commit 0ca7527f7a)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
(cherry picked from commit 095d99dbd2)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-11-22 14:22:30 +05:30
Frappe PR Bot
01fc5f6865 chore(release): Bumped to Version 13.54.12
## [13.54.12](https://github.com/frappe/erpnext/compare/v13.54.11...v13.54.12) (2023-11-21)

### Bug Fixes

* `get_previous_allocation` return value ([6cb8a40](6cb8a40339))
* backward compatible query without pluck ([958db77](958db77cda))
* pass check permission in render_address ([65ae8d9](65ae8d9c05))
* **Timesheet:** reset billing hours equal to hours if they exceed actual hours (backport [#38134](https://github.com/frappe/erpnext/issues/38134)) ([#38154](https://github.com/frappe/erpnext/issues/38154)) ([1e43605](1e436052e2))
* **Timesheet:** warn user if billing hours > actual hours instead of resetting  (backport [#38239](https://github.com/frappe/erpnext/issues/38239)) ([#38242](https://github.com/frappe/erpnext/issues/38242)) ([a9429e1](a9429e160d))
* use `get_all` instead of `get_list` ([4b8ed0f](4b8ed0f6ae))

### Performance Improvements

* index most queried fields in Leave Ledger Entry ([eea7bbc](eea7bbcea7))
* limit rows to 1 for cf leave expiry query ([635c3d5](635c3d54f5))
2023-11-21 18:56:36 +00:00
Deepesh Garg
911e2c5b36 Merge pull request #38249 from frappe/version-13-hotfix
chore: release v13
2023-11-22 00:25:25 +05:30
Frappe PR Bot
91a132c011 chore(release): Bumped to Version 13.54.11
## [13.54.11](https://github.com/frappe/erpnext/compare/v13.54.10...v13.54.11) (2023-11-14)

### Bug Fixes

* close `Credit Limit Crossed` dialog (backport [#38052](https://github.com/frappe/erpnext/issues/38052)) ([#38057](https://github.com/frappe/erpnext/issues/38057)) ([5be5fde](5be5fde276))
2023-11-14 12:56:26 +00:00
Deepesh Garg
2263542a6b Merge pull request #38087 from frappe/version-13-hotfix
chore: release v13
2023-11-14 18:25:03 +05:30
Frappe PR Bot
6a53e823f0 chore(release): Bumped to Version 13.54.10
## [13.54.10](https://github.com/frappe/erpnext/compare/v13.54.9...v13.54.10) (2023-11-08)

### Bug Fixes

* add missing disbursement account in update_old_loans patch ([37b1a0e](37b1a0e778))
* bump pygithub requirement to handle conflict ([#37800](https://github.com/frappe/erpnext/issues/37800)) ([13d5eec](13d5eec194))
* e-invoice jwt verification error ([#37818](https://github.com/frappe/erpnext/issues/37818)) ([8f4ded6](8f4ded6ad1))
* permission error while creating Supplier Quotation from Portal (backport [#37864](https://github.com/frappe/erpnext/issues/37864)) ([#37872](https://github.com/frappe/erpnext/issues/37872)) ([6952f0f](6952f0f082))
* Quality Inspection Parameter migration - DuplicateEntryError due to case sensitivity (backport [#37499](https://github.com/frappe/erpnext/issues/37499)) ([#37918](https://github.com/frappe/erpnext/issues/37918)) ([4789eca](4789ecacea))
* remove voucher type and no for Item and Warehouse based reposting (backport [#37849](https://github.com/frappe/erpnext/issues/37849)) (backport [#37850](https://github.com/frappe/erpnext/issues/37850)) ([#37938](https://github.com/frappe/erpnext/issues/37938)) ([8cb0f69](8cb0f690d5))
2023-11-08 06:04:16 +00:00
Deepesh Garg
c808607975 Merge pull request #37966 from frappe/version-13-hotfix
chore: release v13
2023-11-08 11:33:04 +05:30
Frappe PR Bot
c84384aa1b chore(release): Bumped to Version 13.54.9
## [13.54.9](https://github.com/frappe/erpnext/compare/v13.54.8...v13.54.9) (2023-11-01)

### Bug Fixes

* e-invoice jwt verification error (backport [#37818](https://github.com/frappe/erpnext/issues/37818)) ([#37820](https://github.com/frappe/erpnext/issues/37820)) ([428f7a6](428f7a61ef))
2023-11-01 07:59:52 +00:00
mergify[bot]
428f7a61ef fix: e-invoice jwt verification error (backport #37818) (#37820)
fix: e-invoice jwt verification error (#37818)

(cherry picked from commit 8f4ded6ad1)

Co-authored-by: Dany Robert <rtdany10@gmail.com>
2023-11-01 13:28:21 +05:30
Frappe PR Bot
9607d69ada chore(release): Bumped to Version 13.54.8
## [13.54.8](https://github.com/frappe/erpnext/compare/v13.54.7...v13.54.8) (2023-10-31)

### Bug Fixes

* bump pygithub requirement to handle conflict (backport [#37800](https://github.com/frappe/erpnext/issues/37800)) ([#37808](https://github.com/frappe/erpnext/issues/37808)) ([aaba335](aaba335273))
2023-10-31 14:46:40 +00:00
mergify[bot]
aaba335273 fix: bump pygithub requirement to handle conflict (backport #37800) (#37808)
fix: bump pygithub requirement to handle conflict (#37800)

build: bump pygithub requirement

This conflicts with pyjwt

(cherry picked from commit 13d5eec194)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-10-31 20:04:31 +05:30
Frappe PR Bot
411bba1b98 chore(release): Bumped to Version 13.54.7
## [13.54.7](https://github.com/frappe/erpnext/compare/v13.54.6...v13.54.7) (2023-10-31)

### Bug Fixes

* wrong german translation ([#37658](https://github.com/frappe/erpnext/issues/37658)) ([5669a89](5669a89afe))
2023-10-31 12:45:41 +00:00
rohitwaghchaure
49f2d868c7 Merge pull request #37786 from frappe/version-13-hotfix
chore: release v13
2023-10-31 18:14:20 +05:30
Frappe PR Bot
dd6498d347 chore(release): Bumped to Version 13.54.6
## [13.54.6](https://github.com/frappe/erpnext/compare/v13.54.5...v13.54.6) (2023-10-25)

### Bug Fixes

* incorrect cost center in the purchase invoice (backport [#37591](https://github.com/frappe/erpnext/issues/37591)) ([#37610](https://github.com/frappe/erpnext/issues/37610)) ([4fc45b0](4fc45b035a))
* remove from or target warehouse for non internal transfer entries (backport [#37612](https://github.com/frappe/erpnext/issues/37612)) ([#37629](https://github.com/frappe/erpnext/issues/37629)) ([b5b5187](b5b51879ee))
2023-10-25 03:45:08 +00:00
Deepesh Garg
6e871c51ef Merge pull request #37655 from frappe/version-13-hotfix
chore: release v13
2023-10-25 09:13:26 +05:30
Frappe PR Bot
24103554f5 chore(release): Bumped to Version 13.54.5
## [13.54.5](https://github.com/frappe/erpnext/compare/v13.54.4...v13.54.5) (2023-10-19)

### Bug Fixes

* e-commerce permissions for address (backport [#37554](https://github.com/frappe/erpnext/issues/37554)) ([#37560](https://github.com/frappe/erpnext/issues/37560)) ([49d0ab5](49d0ab5867))
* **gp:** wrong `allocated_amount` on multi sales person invoice ([7805c3a](7805c3acf6))
* Issues related to RFQ and Supplier Quotation on Portal (backport [#37565](https://github.com/frappe/erpnext/issues/37565)) (backport [#37577](https://github.com/frappe/erpnext/issues/37577)) ([#37588](https://github.com/frappe/erpnext/issues/37588)) ([bc907b2](bc907b22d4))
* keep customer/supplier website role by default ([52aff1f](52aff1f703))
* negative valuation rate in PR return (backport [#37424](https://github.com/frappe/erpnext/issues/37424)) ([#37462](https://github.com/frappe/erpnext/issues/37462)) ([66ad823](66ad823417))
* use `flt` to ignore TypeError (backport [#37481](https://github.com/frappe/erpnext/issues/37481)) ([#37489](https://github.com/frappe/erpnext/issues/37489)) ([8b4e692](8b4e69235a))
2023-10-19 11:36:26 +00:00
Deepesh Garg
d459421175 Merge pull request #37544 from frappe/version-13-hotfix
chore: release v13
2023-10-19 17:04:53 +05:30
8 changed files with 51 additions and 77 deletions

View File

@@ -11,10 +11,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: 3.8
- name: Install and Run Pre-commit
uses: pre-commit/action@v2.0.3
@@ -22,8 +22,10 @@ jobs:
- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
- name: Download semgrep
run: pip install semgrep
- name: Run Semgrep rules
run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
- uses: returntocorp/semgrep-action@v1
env:
SEMGREP_TIMEOUT: 120
with:
config: >-
r/python.lang.correctness
./frappe-semgrep-rules/rules

View File

@@ -4,7 +4,7 @@ import frappe
from erpnext.hooks import regional_overrides
__version__ = "13.54.4"
__version__ = "13.54.14"
def get_default_company(user=None):

View File

@@ -295,7 +295,6 @@ class PaymentReconciliation(Document):
"amount": pay.get("amount"),
"allocated_amount": allocated_amount,
"difference_amount": pay.get("difference_amount"),
"currency": inv.get("currency"),
}
)

View File

@@ -20,8 +20,7 @@
"section_break_5",
"difference_amount",
"column_break_7",
"difference_account",
"currency"
"difference_account"
],
"fields": [
{
@@ -38,7 +37,7 @@
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Allocated Amount",
"options": "currency",
"options": "Currency",
"reqd": 1
},
{
@@ -113,7 +112,7 @@
"fieldtype": "Currency",
"hidden": 1,
"label": "Unreconciled Amount",
"options": "currency",
"options": "Currency",
"read_only": 1
},
{
@@ -121,7 +120,7 @@
"fieldtype": "Currency",
"hidden": 1,
"label": "Amount",
"options": "currency",
"options": "Currency",
"read_only": 1
},
{
@@ -130,18 +129,11 @@
"hidden": 1,
"label": "Reference Row",
"read_only": 1
},
{
"fieldname": "currency",
"fieldtype": "Link",
"hidden": 1,
"label": "Currency",
"options": "Currency"
}
],
"istable": 1,
"links": [],
"modified": "2023-11-28 16:30:43.344612",
"modified": "2021-10-06 11:48:59.616562",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Allocation",

View File

@@ -306,7 +306,7 @@ def get_last_accrual_date(loan, posting_date):
def get_last_disbursement_date(loan, posting_date):
last_disbursement_date = frappe.db.get_value(
"Loan Disbursement",
{"docstatus": 1, "against_loan": loan, "posting_date": ("<=", posting_date)},
{"docstatus": 1, "against_loan": loan, "posting_date": ("<", posting_date)},
"MAX(posting_date)",
)

View File

@@ -13,7 +13,7 @@ frappe.ui.form.on("Communication", {
frappe.confirm(__(confirm_msg, [__("Issue")]), () => {
frm.trigger('make_issue_from_communication');
})
}, __("Create"));
}, "Create");
}
if(!in_list(["Lead", "Opportunity"], frm.doc.reference_doctype)) {

View File

@@ -13,18 +13,10 @@ const DIFFERENCE_FIELD_NAMES = [
frappe.query_reports["Stock Ledger Variance"] = {
"filters": [
{
"fieldname": "company",
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"reqd": 1,
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname": "item_code",
"fieldtype": "Link",
"label": __("Item"),
"label": "Item",
"options": "Item",
get_query: function() {
return {
@@ -35,7 +27,7 @@ frappe.query_reports["Stock Ledger Variance"] = {
{
"fieldname": "warehouse",
"fieldtype": "Link",
"label": __("Warehouse"),
"label": "Warehouse",
"options": "Warehouse",
get_query: function() {
return {
@@ -46,7 +38,7 @@ frappe.query_reports["Stock Ledger Variance"] = {
{
"fieldname": "difference_in",
"fieldtype": "Select",
"label": __("Difference In"),
"label": "Difference In",
"options": [
"",
"Qty",
@@ -57,7 +49,7 @@ frappe.query_reports["Stock Ledger Variance"] = {
{
"fieldname": "include_disabled",
"fieldtype": "Check",
"label": __("Include Disabled"),
"label": "Include Disabled",
}
],

View File

@@ -55,11 +55,6 @@ def get_columns():
"label": _("Warehouse"),
"options": "Warehouse",
},
{
"fieldname": "valuation_method",
"fieldtype": "Data",
"label": _("Valuation Method"),
},
{
"fieldname": "voucher_type",
"fieldtype": "Link",
@@ -199,7 +194,6 @@ def get_columns():
def get_data(filters=None):
filters = frappe._dict(filters or {})
item_warehouse_map = get_item_warehouse_combinations(filters)
valuation_method = frappe.db.get_single_value("Stock Settings", "valuation_method")
data = []
if item_warehouse_map:
@@ -212,17 +206,8 @@ def get_data(filters=None):
continue
for row in report_data:
if has_difference(
row, precision, filters.difference_in, item_warehouse.valuation_method or valuation_method
):
row.update(
{
"item_code": item_warehouse.item_code,
"warehouse": item_warehouse.warehouse,
"valuation_method": item_warehouse.valuation_method or valuation_method,
}
)
data.append(row)
if has_difference(row, precision, filters.difference_in):
data.append(add_item_warehouse_details(row, item_warehouse))
break
return data
@@ -244,14 +229,8 @@ def get_item_warehouse_combinations(filters: dict = None) -> dict:
.select(
bin.item_code,
bin.warehouse,
item.valuation_method,
)
.where(
(item.is_stock_item == 1)
& (item.has_serial_no == 0)
& (warehouse.is_group == 0)
& (warehouse.company == filters.company)
)
.where((item.is_stock_item == 1) & (item.has_serial_no == 0) & (warehouse.is_group == 0))
)
if filters.item_code:
@@ -264,27 +243,37 @@ def get_item_warehouse_combinations(filters: dict = None) -> dict:
return query.run(as_dict=1)
def has_difference(row, precision, difference_in, valuation_method):
if valuation_method == "Moving Average":
qty_diff = flt(row.difference_in_qty, precision)
value_diff = flt(row.diff_value_diff, precision)
valuation_diff = flt(row.valuation_diff, precision)
else:
qty_diff = flt(row.difference_in_qty, precision) or flt(row.fifo_qty_diff, precision)
value_diff = (
flt(row.diff_value_diff, precision)
or flt(row.fifo_value_diff, precision)
or flt(row.fifo_difference_diff, precision)
)
valuation_diff = flt(row.valuation_diff, precision) or flt(row.fifo_valuation_diff, precision)
def has_difference(row, precision, difference_in):
has_qty_difference = flt(row.difference_in_qty, precision) or flt(row.fifo_qty_diff, precision)
has_value_difference = (
flt(row.diff_value_diff, precision)
or flt(row.fifo_value_diff, precision)
or flt(row.fifo_difference_diff, precision)
)
has_valuation_difference = flt(row.valuation_diff, precision) or flt(
row.fifo_valuation_diff, precision
)
if difference_in == "Qty" and qty_diff:
if difference_in == "Qty" and has_qty_difference:
return True
elif difference_in == "Value" and value_diff:
elif difference_in == "Value" and has_value_difference:
return True
elif difference_in == "Valuation" and valuation_diff:
elif difference_in == "Valuation" and has_valuation_difference:
return True
elif difference_in not in ["Qty", "Value", "Valuation"] and (
qty_diff or value_diff or valuation_diff
has_qty_difference or has_value_difference or has_valuation_difference
):
return True
return False
def add_item_warehouse_details(row, item_warehouse):
row.update(
{
"item_code": item_warehouse.item_code,
"warehouse": item_warehouse.warehouse,
}
)
return row