Open agritheory opened 4 months ago
@agritheory
can you please explain what should I do in this task?
Screenshot / Selenium test for primary, secondary and summary print view
@viralkansodiya For this task, I'll move it into its own ticket. It involves adding some dependencies.
@viralkansodiya I am getting a Content Not Found Error that's coming from one or both of the print formats. Can you take a look at this?
@agritheory I hope you are testing this print preview PR in version 14
@viralkansodiya I am getting a Content Not Found Error that's coming from one or both of the print formats. Can you take a look at this?
@agritheory can you send me some more details? or if we can connect on call, so I can fix it quickly.
@viralkansodiya I was able to solve the content not found issue. Please update the "Example Voucher" print format so that it is sensitive to overflow (secondary print format feature), this is the comma separated list of source documents.
@agritheory example voucher is already there in my pull request
@agritheory this should be close. I wasn't sure what to add for the no-print background image. Latest commits include:
execute
function okay?)Potentially outstanding:
print_check_run.js
setup_sidebar
, I pull the defaults for Number of Invoices per Voucher and Print Format, but for some reason the Print Format isn't setting as the default in the sidebar.Refactored the print format selection to a dynamic link Pagination is still weird, might be the 'page-break' class in check_run.py might be something else. How to we get labels for the form fields in the sidebar
Latest push fixes a couple things, but here are a few observations in testing this:
number_of_invoices_per_voucher
set to 5, so one overflow. The preview separated them fine but the PDF wasn't adding the page break between the vouchers. Seems fixed by adding a line of code in the print preview for the page breaknumber_of_invoices_per_voucher
if there's a Secondary Print Format set in Check Run Settings, as noted in this comment (see code here). When my settings for Payroll have that field set, Check Run lumps all the references into one Payment Entry, so printing preview shows the overflow (but oddly, actually rendering the PDF didn't seem to be a problem). The latest change with the page break at the end of the print format seems to conform the preview and actual PDF page breaks, but I'm only testing when the Check Run Setting secondary print format field is blank.
Latest push refactors the Example Voucher so if the Secondary Print Format is set in Check Run Settings, then the references are displayed as a comma-separated list. I tweaked the left positions of the date and paid amount, too - they were wrapping or cutting off in the actual PDF render.
Screen shots of the outcome now:
With Secondary Print Format set - multiple people renders okay too.
Without Secondary Print Format set - fine for one person, more than 12 invoices is pushing the space limit. The preview still has display issues when there are multiple people being paid in the CR, but oddly the PDF render is fine
To do:
Screenshot / Playwright test for primary, secondary and summary print view(move to separate issue)increment_print_count
workflow