Repository navigation
Lay out the credit note list like the order list of default-twig - #28
Merged
ThomasDaSilva merged 3 commits intoOct 23, 2026
Merged
ThomasDaSilva merged 3 commits into
ThomasDaSilva merged 3 commits into
Conversation
One search over the reference, the invoice reference, the order and the customer (every word, in any order); status, type, invoice date and amount filters in a collapsed panel with chips for the active ones; columns sorted by reference, total, creation or update date, rendered by the BoDataTable and BoPagination components of default-twig. The id column is gone. The invoice reference has its own column with the date of the document; the customer shows the flag of the invoice country, the name and the e-mail. Edit and delete show only with the update or delete right on the module. The parameters of the previous list (status_id of the side menu, ref, creditNoteDateMin, creditNoteDateMax) still filter, and a parameter of the wrong shape is ignored instead of answering 400. CreditNoteHookPresenter::listRows() is replaced by CreditNoteListReader and CreditNoteListRowPresenter. Version 4.4.0.
ThomasDaSilva
marked this pull request as ready for review
October 23, 2026 11:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The credit note list of the back-office was a plain Bootstrap table: an id column, eleven data columns, a search on the reference and the invoice date only, and a link for every page (more than 600 on a shop with 13,000 credit notes). It now has the layout of the order list of default-twig and uses the same components.
Changes:
BoDataTablewithBoPagination. Columns: reference (opens the modal), invoice reference with the date of the document underneath, customer (flag of the invoice country, name, e-mail, as on the order list), order, status, type, total with tax and without tax underneath, creation date and update date (with their age underneath for 30 days, the date alone afterwards or when it is ahead of the clock), actions. The id column is gone. Reference, total, creation and update dates sort. On a narrow screen the columns fold into the detail row of each line, frommdtoxldepending on the column.row_action(): view and PDF for a numbered credit note, edit and delete before. Edit and delete only show to an administrator with the update or delete right on the module.CreditNoteListFiltersreads the query string,CreditNoteListReaderruns the query,CreditNoteListRowPresenterandCreditNoteListFilterPresentershape the rows and the filters. They replaceCreditNoteHookPresenter::listRows(), which only the list called; it is removed.Compatibility:
status_id(the links of the side menu),ref,creditNoteDateMinandcreditNoteDateMax.credit_note_pageandcredit_note_orderare no longer read; such a link opens the first page, newest first.?status_ids=1,?q[]=x) is ignored. The typed accessors ofInputBagwould answer 400, which the order list of default-twig still does.main:BoDataTable,BoPagination,_page_header.html.twig,row_action(), thebo-order-filtersstyles and thebo-range-slidercontroller.invoice_date, as before. The listener sets it when the credit note gets its reference and again when it is numbered, so a credit note not accepted yet is found by the date it was created.Tested:
CreditNoteListFiltersTest(unit): parsing, legacy parameters, hostile values, chips removal.CreditNoteListTest(integration): search by each field and by words in any order, status, type, amount and date filters, row content, page past the last one, empty list, age of a date past 30 days and ahead of the clock. Each test fails when the code it covers is broken.mainon the same database: the web tests error withoutsymfony/browser-kit, and the numbering and ceiling tests fail on a database with existing credit notes.Not in this PR:
viewAction,updateActionanddeleteActiondo not callcheckAuth(), so hiding the buttons does not protect the routes, anddeleteActionfails on an unknown id. I will open a separate PR for it.