mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 23:22:52 +00:00
* fix: Reverse GL entry on cancellation of document
* fix: Removed set posting time field for multiple docs
* fix: Stop future reposting and reverse entry for purchase receipt and delivery note
* fix: Change is_cancelled field from select to check
* Revert "fix: Removed set posting time field for multiple docs"
This reverts commit 81fb808db7.
* fix: Multiple fixes in GL Entry
* fix: Remove future reporting from doctypes
* fix: Canceled entry filters in Stock Ledger and General Ledger Report
* fix: Remove print statement
* fix: Validation for back dated entries
* fix: Codacy fixes
* fix: Add ignore links to multiple doctypes
* fix: Codacy Fixes
* fix: Ignore GL Entry and Stock Ledger entry while cancel
* fix: Test case fixes
* fix: Patch
* fix: Codacy
* fix: Budget Test Cases
* fix: Patch
* fix: Patch
* fix: Multiple test cases
* fix: changes in make_reverse_entry function
* fix: Update patch
* fix: Test Cases
* fix: Test Case fixes
* fix: Move patch upward in patches.txt
* fix: Budget Test Cases
* fix: Test Case and codacy
* fix: Patch
* fix: Minor label and UX fixes
* fix: Move freezing date check
* fix: Test Cases
* fix: Test cases
* fix: Test Cases
* fix: Test Case
* fix: Remove update_gl_entries_after function
* fix: Remove update_gl_entries_after function
* fix: Test Cases
* fix: Fiscal Year wise backdated entry
* fix: Update entries only for current SLE
* fix: Remove is_cancelled
* fix: Test Cases
* fix: Test cases
* fix: Test Cases
* fix: Uncomment account and stock balance sync logic
* fix: Stock balance and Account balance out of sync fixes
* fix: Test Cases
* fix: Test cases for POS, Stock Reco and Purchase Receipt
* fix: Stock Reco tests
* fix: Test stock reco precision
* fix: Test stock reco for fifo precision
* fix: Test stock reco for fifo precision
* fix: Stock Entry test case
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
104 lines
2.3 KiB
JavaScript
104 lines
2.3 KiB
JavaScript
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
frappe.query_reports["Stock Ledger"] = {
|
|
"filters": [
|
|
{
|
|
"fieldname":"company",
|
|
"label": __("Company"),
|
|
"fieldtype": "Link",
|
|
"options": "Company",
|
|
"default": frappe.defaults.get_user_default("Company"),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"from_date",
|
|
"label": __("From Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"to_date",
|
|
"label": __("To Date"),
|
|
"fieldtype": "Date",
|
|
"default": frappe.datetime.get_today(),
|
|
"reqd": 1
|
|
},
|
|
{
|
|
"fieldname":"warehouse",
|
|
"label": __("Warehouse"),
|
|
"fieldtype": "Link",
|
|
"options": "Warehouse",
|
|
"get_query": function() {
|
|
const company = frappe.query_report.get_filter_value('company');
|
|
return {
|
|
filters: { 'company': company }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"fieldname":"item_code",
|
|
"label": __("Item"),
|
|
"fieldtype": "Link",
|
|
"options": "Item",
|
|
"get_query": function() {
|
|
return {
|
|
query: "erpnext.controllers.queries.item_query"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"fieldname":"item_group",
|
|
"label": __("Item Group"),
|
|
"fieldtype": "Link",
|
|
"options": "Item Group"
|
|
},
|
|
{
|
|
"fieldname":"batch_no",
|
|
"label": __("Batch No"),
|
|
"fieldtype": "Link",
|
|
"options": "Batch"
|
|
},
|
|
{
|
|
"fieldname":"brand",
|
|
"label": __("Brand"),
|
|
"fieldtype": "Link",
|
|
"options": "Brand"
|
|
},
|
|
{
|
|
"fieldname":"voucher_no",
|
|
"label": __("Voucher #"),
|
|
"fieldtype": "Data"
|
|
},
|
|
{
|
|
"fieldname":"project",
|
|
"label": __("Project"),
|
|
"fieldtype": "Link",
|
|
"options": "Project"
|
|
},
|
|
{
|
|
"fieldname":"include_uom",
|
|
"label": __("Include UOM"),
|
|
"fieldtype": "Link",
|
|
"options": "UOM"
|
|
},
|
|
{
|
|
"fieldname": "show_cancelled_entries",
|
|
"label": __("Show Cancelled Entries"),
|
|
"fieldtype": "Check"
|
|
}
|
|
],
|
|
"formatter": function (value, row, column, data, default_formatter) {
|
|
value = default_formatter(value, row, column, data);
|
|
if (column.fieldname == "out_qty" && data.out_qty < 0) {
|
|
value = "<span style='color:red'>" + value + "</span>";
|
|
}
|
|
else if (column.fieldname == "in_qty" && data.in_qty > 0) {
|
|
value = "<span style='color:green'>" + value + "</span>";
|
|
}
|
|
|
|
return value;
|
|
},
|
|
}
|