- Timestamp:
- 2014/05/13 13:03:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_TaxRule.php
r23405 r23415 34 34 * 設定情報に基づいて税金付与した金額を返す 35 35 * 36 * @param integer $price 計算対象の金額 37 * @return integer 税金付与した金額 38 */ 39 public function sfCalcIncTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 36 * @param int $price 計算対象の金額 37 * @param int $product_id 商品ID 38 * @param int $product_class_id 商品規格ID 39 * @param int $pref_id 都道府県ID 40 * @param int $country_id 国ID 41 * @return int 税金付与した金額 42 */ 43 public static function sfCalcIncTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 40 44 { 41 45 return $price + SC_Helper_TaxRule_Ex::sfTax($price, $product_id, $product_class_id, $pref_id, $country_id); … … 45 49 * 設定情報に基づいて税金の金額を返す 46 50 * 47 * @param integer $price 計算対象の金額 48 * @return integer 税金した金額 49 */ 50 public function sfTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 51 * @param int $price 計算対象の金額 52 * @param int $product_id 商品ID 53 * @param int $product_class_id 商品規格ID 54 * @param int $pref_id 都道府県ID 55 * @param int $country_id 国ID 56 * @return int 税金付与した金額 57 */ 58 public static function sfTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 51 59 { 52 60 $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRule($product_id, $product_class_id, $pref_id, $country_id); … … 59 67 * (受注データのようにルールが決まっている場合用) 60 68 * 61 * @param integer $price 計算対象の金額 62 * @return integer 税金付与した金額 63 */ 64 public function calcIncTaxFromRuleId($price, $tax_rule_id = 0) 69 * @param int $price 計算対象の金額 70 * @param int $tax_rule_id 税規約ID 71 * @return int 税金付与した金額 72 */ 73 public static function calcIncTaxFromRuleId($price, $tax_rule_id = 0) 65 74 { 66 75 return $price + SC_Helper_TaxRule_Ex::calcTaxFromRuleId($price, $tax_rule_id); … … 71 80 * (受注データのようにルールが決まっている場合用) 72 81 * 73 * @param integer $price 計算対象の金額 74 * @return integer 税金した金額 75 */ 76 public function calcTaxFromRuleId($price, $tax_rule_id = 0) 82 * @param int $price 計算対象の金額 83 * @param int $tax_rule_id 税規約ID 84 * @return int 税金付与した金額 85 */ 86 public static function calcTaxFromRuleId($price, $tax_rule_id = 0) 77 87 { 78 88 $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRuleData($tax_rule_id); … … 84 94 * 税金額を計算する 85 95 * 86 * @param integer $price 計算対象の金額 87 * @param integer $tax 税率(%単位) 88 * XXX integer のみか不明 89 * @param integer $tax_rule 端数処理 90 * @return integer 税金額 91 */ 92 public function calcTax ($price, $tax, $calc_rule, $tax_adjust = 0) 96 * @param int $price 計算対象の金額 97 * @param int $tax 税率(%単位) 98 * XXX int のみか不明 99 * @param int $calc_rule 端数処理 100 * @param int $tax_adjust 調整額 101 * @return int 税金額 102 */ 103 public static function calcTax ($price, $tax, $calc_rule, $tax_adjust = 0) 93 104 { 94 105 $real_tax = $tax / 100; … … 119 130 * 現在有効な税率設定情報を返す 120 131 * 121 * @param integer $price 計算対象の金額 122 * @return array 税設定情報 123 */ 124 public function getTaxRule($product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) 132 * @param int $product_id 商品ID 133 * @param int $product_class_id 商品規格ID 134 * @param int $pref_id 都道府県ID 135 * @param int $country_id 国ID 136 * @return array 税設定情報 137 */ 138 public static function getTaxRule($product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) 125 139 { 126 140 // 複数回呼出があるのでキャッシュ化 … … 229 243 * 税率設定情報を登録する(商品管理用) 230 244 * 231 * @param decimal $tax_rate消費税率232 * @param integer $product_id商品ID233 * @param integer$product_class_id 商品規格ID234 * @param decimal $tax_adjust消費税加算額235 * @param integer $pref_id県ID236 * @param integer $country_id国ID245 * @param float $tax_rate 消費税率 246 * @param int $product_id 商品ID 247 * @param int $product_class_id 商品規格ID 248 * @param float|int $tax_adjust 消費税加算額 249 * @param int $pref_id 県ID 250 * @param int $country_id 国ID 237 251 * @return void 238 252 */ 239 public function setTaxRuleForProduct($tax_rate, $product_id = 0, $product_class_id = 0, $tax_adjust=0, $pref_id = 0, $country_id = 0)253 public static function setTaxRuleForProduct($tax_rate, $product_id = 0, $product_class_id = 0, $tax_adjust=0, $pref_id = 0, $country_id = 0) 240 254 { 241 255 // 基本設定を取得 … … 256 270 * 税率設定情報を登録する(仮)リファクタする(memo:規格設定後に商品編集を行うと消費税が0になるのを対応が必要) 257 271 * 258 * @param 259 * @return 272 * @param int $calc_rule 端数処理 273 * @param int $tax_rate 税率 274 * @param int|string $apply_date 適用日時 275 * @param null $tax_rule_id 税規約ID 276 * @param int $tax_adjust 調整額 277 * @param int $product_id 商品ID 278 * @param int $product_class_id 商品規格ID 279 * @param int $pref_id 都道府県ID 280 * @param int $country_id 国ID 281 * @return void 260 282 */ 261 283 public function setTaxRule($calc_rule, $tax_rate, $apply_date, $tax_rule_id=NULL, $tax_adjust=0, $product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) … … 297 319 } 298 320 321 /** 322 * @param bool $has_deleted 323 * @return array|null 324 */ 299 325 public function getTaxRuleList($has_deleted = false) 300 326 { … … 313 339 } 314 340 341 /** 342 * @param int $tax_rule_id 343 * @param bool $has_deleted 344 * @return array 345 */ 315 346 public function getTaxRuleData($tax_rule_id, $has_deleted = false) 316 347 { … … 324 355 } 325 356 357 /** 358 * @param int|string $apply_date 359 * @param bool $has_deleted 360 * @return mixed 361 */ 326 362 public function getTaxRuleByTime($apply_date, $has_deleted = false) 327 363 { … … 339 375 * 税規約の削除. 340 376 * 341 * @param int eger$tax_rule_id 税規約ID377 * @param int $tax_rule_id 税規約ID 342 378 * @return void 343 379 */
Note: See TracChangeset
for help on using the changeset viewer.