Просмотр исходного кода

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

zhangl 2 месяцев назад
Родитель
Сommit
32e5d75595
1 измененных файлов с 36 добавлено и 14 удалено
  1. 36 14
      common/libs/export/BaseExport.php

+ 36 - 14
common/libs/export/BaseExport.php

@@ -1577,6 +1577,7 @@ ORDER;
             $orderNums = 0; // 合计总数
             $totalTaxAmount = 0; // 合计税额
             $totalAmount = 0;
+            $paymentStatus = ''; // 支付状态
             foreach ($oderList as $key => $value) {
                 $provinceName = $value['PROVINCE'] ? Region::getCnName($value['PROVINCE']) : '';
                 $cityName = $value['CITY'] ? Region::getCnName($value['CITY']) : '';
@@ -1637,28 +1638,48 @@ EOT;
             $orderBase = <<<ORDER
             <table border="1" style="table-layout: fixed; padding: 10px 20px;" width="100%">
                 <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$memberCode}</td>
-                    <td width="70%">{$userId}</td>
+                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                            Bill to
+                        </td>
+                        <td width="50%">
+                            Invoce No.: 123213123123
+                        </td>
+                    </td>
                 </tr>
                 <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$memberName}</td>
-                    <td width="70%">{$userName}</td>
-                </tr>
-                <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$memberAddress}</td>
-                    <td width="70%">{$address}</td>
+                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                            Name of Distributor: {$userName}
+                        </td>
+                        <td width="50%">
+                            Date: {$orderAt}
+                        </td>
+                    </td>
                 </tr>
                 <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$memberPhone}</td>
-                    <td width="70%">{$mobile}</td>
+                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                        <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                            Member ID: {$userId}
+                        </td>
+                        <td width="50%">
+                            Payment status: {$paymentStatus}
+                        </td>
+                    </td>
                 </tr>
                 <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$orderCode}</td>
-                    <td width="70%">{$orderSn}</td>
+                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                        <td width="100%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                            Address: {$address}
+                        </td>
+                    </td>
                 </tr>
                 <tr>
-                    <td width="30%" style="font-weight: bold; text-align: center; font-size: 14px;">{$createAt}</td>
-                    <td width="70%">{$orderAt}</td>
+                    <td width="50%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                        <td width="100%" style="font-weight: bold; text-align: center; font-size: 14px;">
+                            Contact: {$mobile}
+                        </td>
+                    </td>
                 </tr>
             </table>
 ORDER;
@@ -1703,6 +1724,7 @@ ORDER;
                     <p style="text-align: left; font-size: 20px;">Phone: +971042296118<br></p>
                     <p style="text-align: left; font-size: 20px;">License No: 1314319<br></p>
                     <p style="text-align: left; font-size: 20px;">VAT No: 105034822400003<br></p>
+                    <hr /><br><br>
                     <div>
                         <div style="display: block; width: 100%;">
                             {$orderBase}