Custom PDF invoice Product table columns with individual TAX and currency

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 anos atrás
I am currently developing PDF invoice and want to add some columns "Tax", "Currency", "Product price without Tax".
I am able to make changes in PdfService.cs but i don't know how to set new columns in invoice.
Please can anyone guide me through some lines of code for achieving my purpose?

Thanks in advance.
7 anos atrás
No reply from team ?
7 anos atrás
Finally found the solution, I made changes in PDFservice.cs
created columns
cellProductItem = new PdfPCell(new Phrase(_localizationService.GetResource("PDFIncluding.Tax", lang.Id), titleFont));
              
                cellProductItem.Border = Rectangle.NO_BORDER;
                cellProductItem.HorizontalAlignment = Element.ALIGN_CENTER;
                productsTable.AddCell(cellProductItem);


and than

string unitPrice;


                    var unitPriceInclTaxInCustomerCurrency = _currencyService.ConvertCurrency(orderItem.UnitPriceInclTax, order.CurrencyRate);
                    unitPrice = _priceFormatter.FormatPrice(unitPriceInclTaxInCustomerCurrency, true, order.CustomerCurrencyCode, lang, true);


                    cellProductItem = new PdfPCell(new Phrase(unitPrice, font));
                    cellProductItem.HorizontalAlignment = Element.ALIGN_CENTER;
                    cellProductItem.Border = Rectangle.NO_BORDER;
                    productsTable.AddCell(cellProductItem);


So, this is best and easiest way to understand the structure of PDFservice.cs

Hope it will help someone.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.