Skip to content

Commit

Permalink
feat: config posting date in check run settings
Browse files Browse the repository at this point in the history
  • Loading branch information
agritheory committed Jan 2, 2025
1 parent 76fc626 commit fd1ae27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 5 additions & 1 deletion check_run/check_run/doctype/check_run/check_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ def create_payment_entries(self: Self, transactions: list[frappe._dict]) -> list
party = frappe.db.get_value("Journal Entry Account", group[0].name, "party")
pe = frappe.new_doc("Payment Entry")
pe.payment_type = "Pay"
pe.posting_date = nowdate()
pe.posting_date = (
nowdate()
if settings.set_payment_entry_posting_date == "Use Today's Date"
else self.posting_date
)
pe.mode_of_payment = group[0].mode_of_payment
pe.company = self.company
pe.bank_account = self.bank_account
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"allow_cancellation",
"cascade_cancellation",
"validate_unique_check_number",
"set_payment_entry_posting_date",
"column_break_9",
"number_of_invoices_per_voucher",
"secondary_print_format",
Expand Down Expand Up @@ -229,23 +230,28 @@
"label": "Validate Unique Check Number"
},
{

"fieldname": "secondary_print_format",
"fieldtype": "Link",
"label": "Secondary Print Format",
"options": "Print Format"
},
{

"default": "No",
"fieldname": "allow_stand_alone_debit_notes",
"fieldtype": "Select",
"label": "Allow stand-alone debit notes?",
"options": "Yes\nNo"
},
{
"default": "Use Today's Date",
"fieldname": "set_payment_entry_posting_date",
"fieldtype": "Select",
"label": "Set Payment Entry Posting Date",
"options": "Use Today's Date\nUse Check Run's Posting Date"
}
],
"links": [],
"modified": "2024-04-30 04:53:43.492872",
"modified": "2025-01-02 15:03:09.396159",
"modified_by": "Administrator",
"module": "Check Run",
"name": "Check Run Settings",
Expand Down Expand Up @@ -282,4 +288,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

0 comments on commit fd1ae27

Please sign in to comment.