Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
files: 'check_run.*'
Expand All @@ -19,22 +19,22 @@ repos:
- id: debug-statements

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.16.0
hooks:
- id: mypy
exclude: ^tests/
args: ['--install-types', '--non-interactive', '--ignore-missing-imports']

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
args: ['--ignore-words-list=notin']
additional_dependencies:
- tomli

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
rev: v3.20.0
hooks:
- id: pyupgrade
args: ['--py310-plus']
Expand All @@ -52,13 +52,13 @@ repos:
args: [--remove-all-unused-imports, --in-place]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.2.0
hooks:
- id: flake8
additional_dependencies: ['flake8-bugbear']

- repo: https://github.com/agritheory/test_utils/
rev: v0.17.0
rev: v1.0.0
hooks:
- id: update_pre_commit_config
- id: clean_customized_doctypes
Expand All @@ -73,8 +73,8 @@ repos:
hooks:
- id: prettier
name: prettier
entry: npx prettier . --write --ignore-path .prettierignore
language: node
entry: npx prettier -w . --config .prettierrc.cjs --ignore-path .prettierignore
language: system

ci:
autoupdate_schedule: weekly
Expand Down
File renamed without changes.
28 changes: 14 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ Co-authored-by: Tyler Matteson <tyler@agritheory.com> ([`061be4e`](https:/

* print format changes

* comma saperated on bothe tablec
* comma separated on both tables

* commit to solve linter test

* secondary print format with same attechment
* secondary print format with same attachment

* change field name in print format

* split pdf in two attechment
* split pdf in two attachment

* comment to run lint

Expand Down Expand Up @@ -170,7 +170,7 @@ Co-authored-by: viralpatel15 <viralkansodiya167@gmail.com> ([`0b4bff0`](ht

* Override a function to improve error msg (#205)

* Allocated ammount validation override for msg improvement
* Allocated amount validation override for msg improvement

* comment add

Expand Down Expand Up @@ -242,7 +242,7 @@ Co-authored-by: viralpatel15 <viralkansodiya167@gmail.com> ([`80fa4cf`](ht

* feat: improvement

* feat: file preview treshold
* feat: file preview threshold

* fix: refactor filters to work with prettier, also fix rendering bug

Expand Down Expand Up @@ -502,7 +502,7 @@ Resolution for `TypeError: the JSON object must be str, bytes or bytearray, not

* fix: move bank validation out of override class into hook (#142) ([`f07ad5a`](https://github.com/agritheory/check_run/commit/f07ad5a1c4a9b7e424ad534ec40731f26f6feb0c))

* fix: only increment if check numer is numeric (#139) ([`079aa52`](https://github.com/agritheory/check_run/commit/079aa52bf013e13d3350848ef011b74b99b64bf1))
* fix: only increment if check number is numeric (#139) ([`079aa52`](https://github.com/agritheory/check_run/commit/079aa52bf013e13d3350848ef011b74b99b64bf1))

### Unknown

Expand Down Expand Up @@ -548,7 +548,7 @@ Co-authored-by: Heather Kusmierz <heather.kusmierz@gmail.com> ([`4ccba65`]

* fix: refactor frappe.db.sql to query builder for outstanding

* fix: refactor postive pay to query builder
* fix: refactor positive pay to query builder

* chore: remove print statement

Expand Down Expand Up @@ -666,9 +666,9 @@ Co-authored-by: agritheory <agritheory@users.noreply.github.com> ([`6f5023

* V14 ports (#98)

* chore: port payement entry check number fetch/save to V14
* chore: port payment entry check number fetch/save to V14

* chore: port ach_post procesing hook and company disc data
* chore: port ach_post processing hook and company disc data

* chore: port docstatus fix for ach-only crs

Expand All @@ -680,9 +680,9 @@ Co-authored-by: agritheory <agritheory@users.noreply.github.com> ([`6f5023

* The hook jenv is deprecated New variable is jinja

* chore: port ach_post procesing hook and company disc data
* chore: port ach_post processing hook and company disc data

* fix: fix savepoint wierdness
* fix: fix savepoint weirdness

* fix: company discretionary data fix

Expand Down Expand Up @@ -918,7 +918,7 @@ Not implemented yet:

* test: stub UI test yaml - copied from Frappe

* test: add helper shell files, remove job contitionals
* test: add helper shell files, remove job conditionals

* test: remove producer/consumer test dbs from install script

Expand Down Expand Up @@ -956,7 +956,7 @@ Not implemented yet:

* test: allow empty password = yes

* test: file wasnt saved
* test: file wasn't saved

* test: mariadb version 10.5 => 10.3

Expand Down Expand Up @@ -992,7 +992,7 @@ Not implemented yet:

* test: install apps

* test: add site adn skip assets
* test: add site and skip assets

* test: ci=yes install-app

Expand Down
84 changes: 53 additions & 31 deletions check_run/check_run/doctype/check_run/check_run.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ frappe.ui.form.on('Check Run', {
show_progress_bar(frm, data, 'Processing')
})
frappe.realtime.on('render_check_progress', data => {
show_progress_bar(frm, data, 'Printing')
show_progress_bar(frm, data, 'Rendering')
})
},
validate: frm => {
Expand Down Expand Up @@ -66,6 +66,17 @@ frappe.ui.form.on('Check Run', {
frm.set_df_property('final_check_number', 'read_only', 1)
}
check_settings(frm)
$('[data-original-title="Print"]').hide()
if (frappe.model.can_print(null, frm)) {
frm.page.add_action_icon(
'printer',
() => {
frappe.set_route('print-check-run', frm.doc.name)
},
'',
__('Print')
)
}
},
onload_post_render: frm => {
frm.page.wrapper.find('.layout-side-section').hide()
Expand Down Expand Up @@ -343,6 +354,9 @@ function confirm_print(frm) {
}

function reprint_checks(frm) {
if (frm.settings.print_preview == 'Print from Print Preview') {
return
}
frm.set_value('status', 'Submitted')
let d = new frappe.ui.Dialog({
title: __('Re-Print'),
Expand Down Expand Up @@ -375,43 +389,51 @@ function reprint_checks(frm) {
}

function ach_only(frm) {
frappe
.xcall('check_run.check_run.doctype.check_run.check_run.ach_only', {
docname: frm.doc.name,
})
.then(r => {
if (!r.ach_only) {
if (frm.doc.docstatus == 1) {
if (frm.doc.print_count > 0 && frm.doc.status != 'Ready to Print') {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
frm.add_custom_button(__('Re-Print Checks'), () => {
reprint_checks(frm)
})
if (frm.settings.print_preview != 'Print from Print Preview') {
frappe
.xcall('check_run.check_run.doctype.check_run.check_run.ach_only', {
docname: frm.doc.name,
})
.then(r => {
if (!r.ach_only) {
if (frm.doc.docstatus == 1) {
if (frm.doc.print_count > 0 && frm.doc.status != 'Ready to Print') {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
frm.add_custom_button(__('Re-Print Checks'), () => {
reprint_checks(frm)
})
}
} else if (frm.doc.print_count == 0 && frm.doc.status == 'Submitted') {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
render_checks(frm)
}
}
} else if (frm.doc.print_count == 0 && frm.doc.status == 'Submitted') {
}
if (frm.doc.status == 'Ready to Print') {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
render_checks(frm)
frm.add_custom_button(__('Download Checks'), () => {
download_checks(frm)
})
}
} else if (
frm.doc.print_count == 0 &&
frm.doc.status == 'Submitted' &&
frm.doc.__onload.print_preview == 'Automatically Render PDF after Submit'
) {
render_checks(frm)
}
}
if (frm.doc.status == 'Ready to Print') {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
frm.add_custom_button(__('Download Checks'), () => {
download_checks(frm)
})
}
}
}
if (!r.print_checks_only) {
if (frm.doc.docstatus == 1) {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
frm.add_custom_button(__('Download NACHA File'), () => {
download_nacha(frm)
})
if (!r.print_checks_only) {
if (frm.doc.docstatus == 1) {
if (frappe.perm.has_perm('Check Run', 0, 'print')) {
frm.add_custom_button(__('Download NACHA File'), () => {
download_nacha(frm)
})
}
}
}
}
})
})
}
}

function validate_mode_of_payment_mandatory(frm) {
Expand Down
Loading
Loading