Timeline for How to add custom attribute in Collection?
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 21, 2019 at 16:01 | comment | added | HaFiz Umer | Let us continue this discussion in chat. | |
Mar 21, 2019 at 10:17 | comment | added | HelgeB |
OK, now I've got the view you are talking about :-) Anyway the data source is the same: the value is from grand_total field in sales_invoice_grid table. If you have a value in that field in the database that would really be strange
|
|
Mar 21, 2019 at 9:58 | comment | added | HaFiz Umer |
am run this query in mysql select * from sales_invoice_grid where increment_id = '000000039'; 1 row affected and there is grand total column exist . its mean invoice correctly generated but why invoice grid Amount column has not correct data
|
|
Mar 21, 2019 at 9:53 | comment | added | HaFiz Umer |
HelgeB sorry for late response . i was on lunch break . I don't know why not Grand Total column is not in my Magento 2.2.6 Community edition. I don't work on invoice grid. am install an other magento for checking default behavior, there also Amount Column exist not Grand Total check screenshot of new magento install screenshots.firefox.com/91y3JNkL4P1BX7CO/localhost
|
|
Mar 21, 2019 at 8:11 | comment | added | HelgeB |
As I said, I don't know what the 'Amount' column is - in standard Magento there are columns named 'Grand Total' but not 'Amount' in the grid. Did you change something in the grid? Check the data in the grid table with select * from sales_invoice_grid where increment_id = '000000039'; to see if the data in the grid table is correct.
|
|
Mar 21, 2019 at 8:01 | comment | added | HaFiz Umer | HelgeB Dear In the Invoice Grid Amount Column value has 0 . you can see there i mention in this screenshot screenshots.firefox.com/ePbQ97upXAt2b3Ok/localhost But when i click on view invoice then in detail page everything is good e.g subtotal,granttotal etc . . Why show 0 in Invoice Grid at Amount column ? | |
Mar 21, 2019 at 7:53 | comment | added | HelgeB |
What is Amount in the grid? In my grid I have Grand Total columns but no Amount column. What data is in the invoice if you click on view? If you have correct data there (items, subtotal, tax, shipping) the invoice has been created correctly.
|
|
Mar 21, 2019 at 7:43 | comment | added | HaFiz Umer | HelgeB ! Dear in invoice grid the amount is 0 why this issue create ? kindly look at this screenshot please screenshots.firefox.com/ePbQ97upXAt2b3Ok/localhost | |
Mar 20, 2019 at 8:04 | comment | added | HaFiz Umer | okay HelgeB ! i try to hide these row from template or css | |
Mar 20, 2019 at 7:47 | comment | added | HelgeB |
I would not remove them from the collection (because of complications in the calculation process, e.g. for totals) but either not render them in the template (skip the row with qty = 0 or better current_seller_id does not match) or using css class to just hide the row. Just look for the template and see what's the best for you - I guess the template is somewehere in the sales module in adminhtml templates: order/invoice/create/items/renderer/default.phtml could be the location
|
|
Mar 20, 2019 at 7:39 | comment | added | HaFiz Umer | HelgeB ! 1 thing more need to correct. In New Invoice page those items which is not for current user is present in Items to invoice Section with qty,grandtotal,rowtotal etc all thing value are 0. How can we exclude these items which is not belong to current user ? I want that not to shown also in New Invoice page. how remove those items ? it should look like this i.sstatic.net/B2HZw.png | |
Mar 20, 2019 at 7:32 | vote | accept | HaFiz Umer | ||
Mar 20, 2019 at 7:32 | comment | added | HaFiz Umer | ! yes it absolute Answer . others thing also manage from your solution,for example total,grantotal and current login user entities insert in database. from my filter getAllItems() it insert all items of invoice and total etc are also count wrong. Thanks | |
Mar 15, 2019 at 9:58 | comment | added | HaFiz Umer | HelgeB and @Prathap Gunasekaran Thanks for answering me ! my requirement was that i want to filter collection in the new invoice page. I apply condition on the custom attribute (current_seller_id) that is in sales_order_item . . I did this and share with both of you in answer please wait. Thanks for response me ASA | |
Mar 14, 2019 at 14:09 | history | answered | HelgeB | CC BY-SA 4.0 |