Преглед изворни кода

feat: EK-3320: 订单增加 Invoice 下载

zhangl пре 1 месец
родитељ
комит
caf85c7d8a
1 измењених фајлова са 9 додато и 7 уклоњено
  1. 9 7
      common/libs/export/BaseExport.php

+ 9 - 7
common/libs/export/BaseExport.php

@@ -1578,7 +1578,9 @@ ORDER;
             $totalTaxAmount = 0; // 合计税额
             $totalAmount = 0;
             $paymentStatus = ''; // 支付状态
+            $invoiceRemark = '';
             foreach ($oderList as $key => $value) {
+                $invoiceRemark = $value['INVOICE_REMARK'] ? $value['INVOICE_REMARK'] : '';
                 $provinceName = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
                 $cityName = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
                 $countyName = $value['COUNTY'] ? Region::getCnName($value['COUNTY']) : '';
@@ -1683,8 +1685,8 @@ ORDER;
             $totalTaxAmount = Tool::formatAmount($totalTaxAmount);
 
             $context = <<<ORDER
-            <!doctype html>
-            <html lang="en">
+        <!doctype html>
+        <html lang="en">
             <head>
                 <meta charset="UTF-8" />
                 <title>{$taxInvoice}</title>
@@ -1738,8 +1740,8 @@ ORDER;
                             <table border="1" width="100%" style="padding: 10px 5px; text-align: left;">
                                 <tr>
                                     <th style="font-size: 14px; font-weight: bold; text-align: center;">No.</th>
-                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">{$productCode}</th>
-                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">{$productName}</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Product Code</th>
+                                    <th style="font-size: 14px; font-weight: bold; text-align: center;">Product Name</th>
                                     <th style="font-size: 14px; font-weight: bold; text-align: center;">Quantity</th>
                                     <th style="font-size: 14px; font-weight: bold; text-align: center;">Unit Price(AED)</th>
                                     <th style="font-size: 14px; font-weight: bold; text-align: center;">Unit BV</th>
@@ -1756,7 +1758,7 @@ ORDER;
                                 <tr><td colspan="11"></td></tr>
                             </table>
                             
-                            <table style="table-layout: fixed; background-color: lightslategray;">  
+                            <table style="table-layout: fixed;">  
                                 <tr>
                                     <td class="table-noborder"></td>
                                     <td style="text-align: left; background-color: lightslategray;" colspan="2">Grand Total</td>
@@ -1816,7 +1818,7 @@ ORDER;
                                     <td colspan="10"></td>
                                 </tr>
                                 <tr>
-                                    <td colspan="4" rowspan="4"><span style="font-size: 12px; color: red;">发票备注内容</span></td>
+                                    <td colspan="4" rowspan="4">{$invoiceRemark}</td>
                                     <td colspan="7" rowspan="4"></td>
                                 </tr>
                             </table>
@@ -1838,7 +1840,6 @@ ORDER;
                             
                             <table style="table-layout: fixed;" class="table-noborder">    
                                 <tr>
-                                    <td></td>
                                     <td>Issued By:</td>
                                     <td>abscesc</td>
                                     <td></td>
@@ -1849,6 +1850,7 @@ ORDER;
                                     <td></td>
                                     <td>Received By:</td>
                                     <td>abscesc</td>
+                                    <td></td>
                                 </tr>
                                 <tr>
                                     <td colspan="11"></td>