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

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

zhangl 1 месяц назад
Родитель
Сommit
c9b53a7caa
2 измененных файлов с 6 добавлено и 3 удалено
  1. 5 2
      common/helpers/Tool.php
  2. 1 1
      common/libs/export/BaseExport.php

+ 5 - 2
common/helpers/Tool.php

@@ -643,9 +643,12 @@ class Tool {
             ->where(['STATUS' => 1, 'IS_DELETE' => 0, 'INVOICE_NO' => ['$ne' => '']])
             ->orderBy(['PAY_AT' => SORT_DESC])
             ->one();
-        if ($order) {
+
+        $invoiceNo = $order->INVOICE_NO;
+
+        if ($invoiceNo) {
             // 截取后 5 位, 转为数字+1
-            $no = sprintf('%05d', intval(substr($order->INVOICE_NO, -5)) + 1);
+            $no = sprintf('%05d', intval(substr($invoiceNo, -5)) + 1);
         } else {
             $no = '00001';
         }

+ 1 - 1
common/libs/export/BaseExport.php

@@ -1804,7 +1804,7 @@ EOT;
                         
                         <table style="table-layout: fixed;">  
                             <tr style="text-align: left; font-weight: normal; font-size: 12px;">
-                                <td class="table-noborder"></td>
+                                <td class="table-noborder" style="width: 30px;"></td>
                                 <td style="text-align: left; background-color: lightslategray;" colspan="2">Grand Total</td>
                                 <td style="text-align: left; background-color: lightslategray;">{$orderTotalQuantity}</td>
                                 <td style="text-align: left; background-color: lightslategray;"></td>