我无法在装运的pdf中插入某一物品的售价。
我补充说
$page->drawText($item->getPrice(), $x + 5, $this->y, 'UTF-8');但是,我没有包括增值税在内的价格,但不包括增值税的价格,如何增加ttc的价格或线路的总数?
发布于 2021-12-09 11:35:31
感谢这个help.here是当前的代码:如何调整它以增加ttc的最终价格?
foreach ($shipment->getItemsCollection() as $item) {
/**
* @var Mage_Sales_Model_Order_Shipment_Item $item
*/
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0.85));
$page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
$page->setLineWidth(0.5);
$page->drawRectangle($x + 420, $this->y - 8, $page->getWidth() - 50, $this->y + 12);
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
$page->drawRectangle(50, $this->y - 8, $page->getWidth() - 50, $this->y + 12, Zend_Pdf_Page::SHAPE_DRAW_STROKE);
$page->drawLine($x + 70, $this->y + 12, $x + 70, $this->y - 8);
$page->drawLine($x + 350, $this->y + 12, $x + 350, $this->y - 8);
$page->drawLine($x + 420, $this->y + 12, $x + 420, $this->y - 8);
$page->drawText($item->getSku(), $x + 5, $this->y, 'UTF-8');
$page->drawText(strlen($item->getName()) > 50 ? substr($item->getName(), 0, 52) . "..." : $item->getName(), $x + 75, $this->y, 'UTF-8');
$product = Mage::getModel('catalog/product')->load($item->getProductId());
if ($product->getId()) {
$size = $product->getAttributeText('size') ?: $product->getData('size_label');
$page->drawText($size, $x + 355, $this->y, 'UTF-8');
}
$page->drawText('', $x + 425, $this->y, 'UTF-8');
$this->y -= 20;
}`**enter code here**`https://stackoverflow.com/questions/70213032
复制相似问题