コード例 #1
0
ファイル: ProductsTranches.php プロジェクト: kokkez/shineisp
 /**
  * Save the billing tranches
  * 
  * 
  * @param integer $productId
  * @param integer $billingId
  * @param integer $qta
  * @param string $measure
  * @param float $price
  */
 public static function saveAll($productId, $billingId, $qta, $measure, $price, $setupfee = 0)
 {
     $tranches = new ProductsTranches();
     $tranches->quantity = $qta;
     $tranches->measurement = $measure;
     $tranches->billing_cycle_id = $billingId;
     $tranches->setupfee = $setupfee;
     $tranches->price = $price;
     $tranches->product_id = $productId;
     $tranches->save();
     return $tranches;
 }