Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e6d78fa
wip: print preview
agritheory May 14, 2024
efd19d2
Print Preview Changes by FossERP (#245)
viralkansodiya Jun 29, 2024
37bae70
wip: configurable PDF generation or preview
agritheory Jul 10, 2024
b0fc0a8
wip: print preview working
agritheory Jul 22, 2024
9125970
chore: black
agritheory Jul 22, 2024
de50489
wip: update prettier approach
agritheory Jul 22, 2024
1010d5f
Merge branch 'version-14' into print_preview
agritheory Jul 24, 2024
0ffc56d
ci: add auto-created rc file
HKuz Jul 31, 2024
1ea70a7
ci: update override commit hashes
HKuz Jul 31, 2024
5092250
test: fix duplicated date
HKuz Jul 31, 2024
36660bd
feat: add printable MOP in settings, update print formats
HKuz Jul 31, 2024
7240b9e
docs: update for print settings
HKuz Jul 31, 2024
b60e08b
feat: add multiselect child table
HKuz Jul 31, 2024
648465b
ci: update override commit hashes -correct branch
HKuz Jul 31, 2024
02ffee9
chore: add patch for multiselect printable mops
HKuz Jul 31, 2024
14a1e4e
Merge branch 'version-14' into print_preview
HKuz Jul 31, 2024
eb9d2fc
wip: refactor to dynamic link
agritheory Aug 28, 2024
a88fd21
ci: update track override commits
HKuz Sep 3, 2024
cc10257
refactor: add page break in print format
HKuz Sep 18, 2024
2a6b154
refactor: lists references vs table if secondary print format set
HKuz Sep 18, 2024
d43c2e8
feat: limit table to 6 references otherwise comma separate
HKuz Oct 11, 2024
781d4c6
chore: update track overrides hash values
HKuz Oct 11, 2024
4998e32
Merge remote-tracking branch 'upstream/version-14' into print_preview
Jan 21, 2025
cac1bb9
fix: update example voucher format to include background image only i…
Alchez Jun 11, 2025
e97ba6a
fix: remove background image from all Check Run prints
Alchez Jun 11, 2025
523dd31
style: fix pre-commit issues
Alchez Jun 11, 2025
71516dc
Merge remote-tracking branch 'upstream/version-14' into print_preview
Alchez Jun 11, 2025
d1a6d15
Merge branch 'version-14' into print_preview
agritheory Jun 11, 2025
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
15 changes: 15 additions & 0 deletions check_run/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Root editor config file
root = true

# Common settings
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# python, js indentation settings
[{*.py,*.js,*.vue,*.css,*.scss,*.html}]
indent_style = tab
indent_size = 2
max_line_length = 99
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