magento 中 2 个或更多订单的单一发票
月底可以为2个或更多订单开具发票吗?我只能看到为每个订单开具发票的选项。
如果没有,我正在寻找一个扩展来计算 2 张或更多发票的打印 PDF 中的总计。
It is possible to make an invoice for 2 or more orders at the end of the month? I can see only to option to make invoice for every order.
If not, I'm looking for an extension to calculate the total in the printed PDF for 2 or more invoices.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否正在寻找每张发票的一页,或者是合并所有订单的发票?批量操作菜单(您可以在订单列表中选中复选框,然后使用下拉列表实际执行操作)将允许您一次打印多个操作,并将每个操作连接到 PDF 中。
如果您想合并订单,则需要编写一些自己的代码,以便在打印订单详细信息之前将其合并在一起。
您要克隆和处理的文件是
Mage_Sales_Model_Order_Pdf_Invoice
。所有Order_Pdf_*
类都实现Mage_Sales_Model_Order_Pdf_Abstract
,因此请确保您也以该类为基础。在控制器级别,查看
Mage_Adminhtml_Sales_OrderController::pdfinvoicesAction
,了解应聚合订单并生成 PDF 的代码。Are you looking for one page for each invoice, or for an invoice that combines all orders? The mass action menu (the one where you check boxes in the order list and then use the dropdown to actually execute an action) will let you print multiples at once, and will concatenate each of them into the PDF.
If you want to combine the orders, you'll need to write some code of your own to coalesce the order details together before printing them.
The file you want to clone and work off of is
Mage_Sales_Model_Order_Pdf_Invoice
. All of theOrder_Pdf_*
classes implementMage_Sales_Model_Order_Pdf_Abstract
, so make sure you base off of that class as well.On the controller level, look at
Mage_Adminhtml_Sales_OrderController::pdfinvoicesAction
, for code that should aggregate the orders and generate a PDF.