Changeset 18097 for branches/comu-ver2
- Timestamp:
- 2009/06/12 03:50:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_Fpdf.php
r18052 r18097 48 48 49 49 $this->arrMessage = array( 50 'このたびはお買上げいただきありがとうございます。',51 '下記の内容にて納品させていただきます。',52 'ご確認いただきますよう、お願いいたします。'50 'このたびはお買上げいただきありがとうございます。', 51 '下記の内容にて納品させていただきます。', 52 'ご確認いただきますよう、お願いいたします。' 53 53 ); 54 54 … … 80 80 $this->pdf->SetDisplayMode($this->tpl_dispmode); 81 81 82 if (SC_Utils_Ex::sfIsInt($arrData['order_id'])) {83 $this->disp_mode = true;84 $order_id = $arrData['order_id'];82 if (SC_Utils_Ex::sfIsInt($arrData['order_id'])) { 83 $this->disp_mode = true; 84 $order_id = $arrData['order_id']; 85 85 } 86 86 … … 110 110 111 111 $text = "TEL: ".$arrInfo['law_tel01']."-".$arrInfo['law_tel02']."-".$arrInfo['law_tel03']; 112 112 //FAX番号が存在する場合、表示する 113 113 if (strlen($arrInfo['law_fax01']) > 0) { 114 114 $text .= " FAX: ".$arrInfo['law_fax01']."-".$arrInfo['law_fax02']."-".$arrInfo['law_fax03']; … … 176 176 for ($i = 0; $i < count($this->arrDisp['quantity']); $i++) { 177 177 178 // 購入数量 179 $data[0] = $this->arrDisp['quantity'][$i]; 180 181 // 税込金額(単価) 182 $data[1] = SC_Helper_DB_Ex::sfPreTax($this->arrDisp['price'][$i]); 183 184 // 小計(商品毎) 185 $data[2] = $data[0] * $data[1]; 186 187 $arrOrder[$i][0] = $this->sjis_conv($this->arrDisp['product_name'][$i]." / "); 188 $arrOrder[$i][0] .= $this->sjis_conv($this->arrDisp['product_code'][$i]." / "); 189 if($this->arrDisp['classcategory_name1'][$i]) { 190 $arrOrder[$i][0] .= $this->sjis_conv(" [ ".$this->arrDisp['classcategory_name1'][$i]); 191 if($this->arrDisp['classcategory_name2'][$i] == "") { 192 $arrOrder[$i][0] .= " ]"; 193 } else { 194 $arrOrder[$i][0] .= $this->sjis_conv(" * ".$this->arrDisp['classcategory_name2'][$i]." ]"); 178 // 購入数量 179 $data[0] = $this->arrDisp['quantity'][$i]; 180 181 // 税込金額(単価) 182 $data[1] = SC_Helper_DB_Ex::sfPreTax($this->arrDisp['price'][$i]); 183 184 // 小計(商品毎) 185 $data[2] = $data[0] * $data[1]; 186 187 $arrOrder[$i][0] = $this->sjis_conv($this->arrDisp['product_name'][$i]." / "); 188 $arrOrder[$i][0] .= $this->sjis_conv($this->arrDisp['product_code'][$i]." / "); 189 if ($this->arrDisp['classcategory_name1'][$i]) { 190 $arrOrder[$i][0] .= $this->sjis_conv(" [ ".$this->arrDisp['classcategory_name1'][$i]); 191 if ($this->arrDisp['classcategory_name2'][$i] == "") { 192 $arrOrder[$i][0] .= " ]"; 193 } else { 194 $arrOrder[$i][0] .= $this->sjis_conv(" * ".$this->arrDisp['classcategory_name2'][$i]." ]"); 195 } 195 196 } 196 } 197 $arrOrder[$i][1] = number_format($data[0]); 198 $arrOrder[$i][2] = number_format($data[1]).$monetary_unit; 199 $arrOrder[$i][3] = number_format($data[2]).$monetary_unit; 197 $arrOrder[$i][1] = number_format($data[0]); 198 $arrOrder[$i][2] = number_format($data[1]).$monetary_unit; 199 $arrOrder[$i][3] = number_format($data[2]).$monetary_unit; 200 200 201 201 } … … 236 236 $arrOrder[$i][3] = number_format($this->arrDisp['payment_total']).$monetary_unit; 237 237 238 $i++;239 $arrOrder[$i][0] = "";240 $arrOrder[$i][1] = "";241 $arrOrder[$i][2] = "";242 $arrOrder[$i][3] = "";243 244 238 // ポイント表記 245 239 if ($this->arrData['disp_point'] && $this->arrDisp['customer_id']) { 246 $i++; 247 $arrOrder[$i][0] = ""; 248 $arrOrder[$i][1] = ""; 249 $arrOrder[$i][2] = $this->sjis_conv("利用ポイント"); 250 $arrOrder[$i][3] = number_format($this->arrDisp['use_point']).$point_unit; 251 252 $i++; 253 $arrOrder[$i][0] = ""; 254 $arrOrder[$i][1] = ""; 255 $arrOrder[$i][2] = $this->sjis_conv("加算ポイント"); 256 $arrOrder[$i][3] = number_format($this->arrDisp['add_point']).$point_unit; 257 258 $i++; 259 $arrOrder[$i][0] = ""; 260 $arrOrder[$i][1] = ""; 261 $arrOrder[$i][2] = $this->sjis_conv("所有ポイント"); 262 $arrOrder[$i][3] = number_format($this->arrDisp['point']).$point_unit; 240 $i++; 241 $arrOrder[$i][0] = ""; 242 $arrOrder[$i][1] = ""; 243 $arrOrder[$i][2] = ""; 244 $arrOrder[$i][3] = ""; 245 246 $i++; 247 $arrOrder[$i][0] = ""; 248 $arrOrder[$i][1] = ""; 249 $arrOrder[$i][2] = $this->sjis_conv("利用ポイント"); 250 $arrOrder[$i][3] = number_format($this->arrDisp['use_point']).$point_unit; 251 252 $i++; 253 $arrOrder[$i][0] = ""; 254 $arrOrder[$i][1] = ""; 255 $arrOrder[$i][2] = $this->sjis_conv("加算ポイント"); 256 $arrOrder[$i][3] = number_format($this->arrDisp['add_point']).$point_unit; 257 258 $i++; 259 $arrOrder[$i][0] = ""; 260 $arrOrder[$i][1] = ""; 261 $arrOrder[$i][2] = $this->sjis_conv("所有ポイント"); 262 $arrOrder[$i][3] = number_format($this->arrDisp['point']).$point_unit; 263 263 } 264 264 … … 277 277 function createPdf() { 278 278 // PDFをブラウザに送信 279 ob_clean();280 if ($this->pdf_download == 1) {281 if ($this->pdf->PageNo() == 1) {282 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf";283 } else {284 $filename = "nouhinsyo.pdf";285 }286 $this->pdf->Output($this->sjis_conv($filename), D);279 ob_clean(); 280 if ($this->pdf_download == 1) { 281 if ($this->pdf->PageNo() == 1) { 282 $filename = "nouhinsyo-No".$this->arrData['order_id'].".pdf"; 283 } else { 284 $filename = "nouhinsyo.pdf"; 285 } 286 $this->pdf->Output($this->sjis_conv($filename), D); 287 287 } else { 288 $this->pdf->Output();288 $this->pdf->Output(); 289 289 } 290 290 … … 300 300 $this->pdf->Text($x, $y, $text); 301 301 } 302 303 302 304 303 // 受注データの取得 … … 309 308 $where = "order_id = ?"; 310 309 $arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id)); 311 #$objFormParam->setParam($arrRet[0]);312 list($point, $total_point) = SC_Helper_DB_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']);313 #$objFormParam->setValue('total_point', $total_point);314 #$objFormParam->setValue('point', $point);315 $arrRet[0]['total_point'] = $total_point;316 $arrRet[0]['point'] = $point;317 310 $this->arrDisp = $arrRet[0]; 311 list($point) = SC_Helper_DB_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 312 $this->arrDisp['point'] = $point; 318 313 319 314 // 受注詳細データの取得 … … 337 332 // 受注詳細データの取得 338 333 function lfGetOrderDetail($order_id) { 339 $objQuery = new SC_Query();340 $col = "product_id, classcategory_id1, classcategory_id2, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate";341 $where = "order_id = ?";342 $objQuery->setorder("classcategory_id1, classcategory_id2");343 $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id));344 return $arrRet;334 $objQuery = new SC_Query(); 335 $col = "product_id, classcategory_id1, classcategory_id2, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate"; 336 $where = "order_id = ?"; 337 $objQuery->setorder("classcategory_id1, classcategory_id2"); 338 $arrRet = $objQuery->select($col, "dtb_order_detail", $where, array($order_id)); 339 return $arrRet; 345 340 } 346 341 347 342 // 文字コードSJIS変換 -> japanese.phpで使用出来る文字コードはSJISのみ 348 343 function sjis_conv($conv_str) { 349 return (mb_convert_encoding($conv_str, "SJIS", CHAR_CODE)); 350 } 351 344 return (mb_convert_encoding($conv_str, "SJIS", CHAR_CODE)); 345 } 352 346 353 347 }
Note: See TracChangeset
for help on using the changeset viewer.