1
A
回答
1
负载由
$invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceIncrementId);
,然后将发票使用
$createdDate = $invoice->getCreatedAt();
拿到发票日期,并把$ createdDate和
$page->drawText(
Mage::helper('sales')->__('Order Date: ') . Mage::helper('core')->formatDate(
$order->getCreatedAtStoreDate(), 'medium', false
),
35,
($top -= 15),
'UTF-8'
);
修改下面的代码,
$page->drawText(
Mage::helper('sales')->__('Invoice Creation Date: ') . Mage::helper('core')->formatDate(
$createdDate, 'medium', false
),
35,
($top -= 15),
'UTF-8'
);
注: -
如果您有相同的顺序,那么你可以通过
$_invoices = $_order->getInvoiceCollection();
foreach($_invoices as $_invoice){
$_invoice->getIncrementId() = $_invoice->getIncrementId();
}
0
由于Magento严格通过PHP代码(这意味着它不使用任何html-> pdf解析器或任何类似的想法)创建命令的PDF,您将不得不延长这样做的类并相应地修改它。所以,你要寻找的类是:
Mage_Sales_Model_Order_Pdf_Invoice
与方法
protected function insertOrder(&$page, $obj, $putOrderId = true)
然后搜索
$page->drawText(Mage::helper('sales')->__('Order Date: ') . Mage::helper('core')->formatDate($order->getCreatedAtStoreDate(), 'medium', false), 35, ($top -= 15), 'UTF-8');
而且我猜你知道如何将它与扩展你自己的模块。如果不是,该过程在How to create a simple 'Hello World' module in Magento?中描述。
+0
谢谢,你能告诉我如何显示发票日期吗? – user1916533
0
我有同样的问题,并添加发票日期到应用程序/代码获得所有发票增量ID多张发票/core/Mage/Sales/Model/Order/invoice.php 132行
/* Add document text and number */
$this->insertDocumentNumber(
$page,
Mage::helper('sales')->__('Invoice # ') . $invoice->getIncrementId()
.' '.
Mage::helper('sales')->__('Invoice date: ') . Mage::helper('core')->formatDate(
$invoice->getCreatedAt(), 'medium', false
),
35,
($top -= 15),
'UTF-8'
);
相关问题
- 1. 如何在Magento中显示发票号和日期?
- 2. 在Magento中更改发票日期
- 3. 日期格式创建发票
- 4. 如何在magento网站上显示日期和时间?
- 5. 如何在magento中以全尺寸显示发票pdf标识?
- 6. Magento:如何在创建发票后更改订单状态
- 7. Magento:创建发票号码=订单号的发票?
- 8. 如何创建发票
- 9. 发布日期发票日期逻辑
- 10. 如何为magento可下载产品创建发票?
- 11. 创建发票
- 12. 如何在asp.net中创建发票
- 13. Magento 1.7 - 无法创建发票检查/汇票订单销售
- 14. 如何在创建订单日期显示文件夹?
- 15. 如何在同一日期显示创建的操作?
- 16. 如何在openerp中为多个客户创建定期发票?
- 17. 在动态创建的按钮上显示日期选择器
- 18. 在main.gsp上显示日期
- 19. 如何显示发布日期?
- 20. 错误的博客发布日期显示在Magento
- 21. 如何在Facebook墙上创建投票?
- 22. 如何仅使用JavaScript在网站上显示外部文件创建日期?
- 23. 如何在前端禁用Magento发票
- 24. 创建发票(php)
- 25. 如何在发票上显示opencart产品选项重量
- 26. OpenCart:如何在发票上禁用省份显示?
- 27. Prestashop:如何在发票上显示产品折扣
- 28. Magento电子邮件模板格式发票日期
- 29. 在magento中创建新发票时,事件名称是什么?
- 30. 无法在Magento创建通过REST API发票2.0
谢谢。我试过了,也是这个选择:$ invoice = Mage :: getModel('sales/order_invoice') - > loadByIncrementId($ order-> getOrderId());但它总是显示为创建日期,而不是真正的创建日期......你能帮助我吗?谢谢。 – user1916533
你能说清楚你要更改前端还是管理面板哪个地方 – MagentoDiary
解决了我自己,谢谢。 – user1916533