• R/O
  • SSH
  • HTTPS

myec-cube: 提交


Commit MetaInfo

修订版221 (tree)
时间2011-05-26 10:56:32
作者asben

Log Message

** マイページからの請求書、納品書の印刷の作成日の変更 **
請求書=>注文日
納品書=>発送済みにした日

更改概述

差异

--- branches/244/data/class/pages/mypage/LC_Page_Mypage_pdfout.php (revision 220)
+++ branches/244/data/class/pages/mypage/LC_Page_Mypage_pdfout.php (revision 221)
@@ -49,11 +49,26 @@
4949 $arrRet = $this->setTplData(intval($_POST['mode']));
5050 $arrRet['order_id'] = intval($_POST['order_id']);
5151
52- // 今日の日付をセット
53- $arrRet['year'] = date("Y");
54- $arrRet['month'] = date("m");
55- $arrRet['day'] = date("d");
52+ $col = "create_date, commit_date";
53+ $from = "dtb_order";
54+ $where = "del_flg = 0 AND order_id = ?";
55+ $id = intval($_POST['order_id']);
56+ $arr = $objQuery->select($col, $from, $where, array($id));
5657
58+ $arrDate = $arr[0];
59+
60+ // 帳票種別が納品書の場合は発送日
61+ if( intval($_POST['mode'] ) == 0 ) {
62+ $setDateData = $arrDate['commit_date'];
63+ }
64+ else {
65+ $setDateData = $arrDate['create_date'];
66+ }
67+
68+ $arrRet['year'] = idate("Y", strtotime($setDateData));
69+ $arrRet['month'] = idate("m", strtotime($setDateData));
70+ $arrRet['day'] = idate("d", strtotime($setDateData));
71+
5772 $objFpdf = new SC_Fpdf($arrRet['download'], $arrRet['title']);
5873 $arrPdfData = $arrRet;
5974 $objFpdf->setData($arrPdfData);
Show on old repository browser