Changeset 2759
- Timestamp:
- 02/27/10 02:28:58 (2 years ago)
- Files:
-
- trunk/common/lib/admin.defines.php (modified) (1 diff)
- trunk/common/lib/agent.defines.php (modified) (1 diff)
- trunk/common/lib/customer.defines.php (modified) (1 diff)
- trunk/Cronjobs/a2billing_subscription_fee.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/common/lib/admin.defines.php
r2756 r2759 32 32 **/ 33 33 34 define ("PHP_QUICK_PROFILER", false);34 define ("PHP_QUICK_PROFILER", true); 35 35 // Include PHP-Quick-Profiler 36 36 require_once('PhpQuickProfiler.php'); trunk/common/lib/agent.defines.php
r2756 r2759 32 32 **/ 33 33 34 define ("PHP_QUICK_PROFILER", false);34 define ("PHP_QUICK_PROFILER", true); 35 35 // Include PHP-Quick-Profiler 36 36 require_once('PhpQuickProfiler.php'); trunk/common/lib/customer.defines.php
r2756 r2759 32 32 **/ 33 33 34 define ("PHP_QUICK_PROFILER", false);34 define ("PHP_QUICK_PROFILER", true); 35 35 // Include PHP-Quick-Profiler 36 36 require_once('PhpQuickProfiler.php'); trunk/Cronjobs/a2billing_subscription_fee.php
r2730 r2759 117 117 118 118 119 $billdaybefor_annivers ery = $A2B->config['global']['subscription_bill_days_before_anniversary'];119 $billdaybefor_anniversary = $A2B->config['global']['subscription_bill_days_before_anniversary']; 120 120 121 121 $currencies_list = get_currencies($A2B->DBHandle); … … 162 162 $lastday_of_next_month= lastDayOfMonth(date("m",$next_bill_date),date("Y",$next_bill_date),"j"); 163 163 164 $limite_pay_date = date("Y-m-d",strtotime(" + $billdaybefor_annivers ery day")) ;164 $limite_pay_date = date("Y-m-d",strtotime(" + $billdaybefor_anniversary day")) ; 165 165 166 166 if ($day_startdate>$lastday_of_next_month){ … … 170 170 } 171 171 172 $next_bill_date = date("Y-m-d",strtotime("$next_limite_pay_date - $billdaybefor_annivers ery day")) ;172 $next_bill_date = date("Y-m-d",strtotime("$next_limite_pay_date - $billdaybefor_anniversary day")) ; 173 173 break; 174 174 … … 204 204 $lastday_of_next_month= lastDayOfMonth(date("m",$next_bill_date),date("Y",$next_bill_date),"j"); 205 205 206 $limite_pay_date = date("Y-m-d",strtotime(" + $billdaybefor_annivers ery day")) ;206 $limite_pay_date = date("Y-m-d",strtotime(" + $billdaybefor_anniversary day")) ; 207 207 208 208 if ($day_startdate>$lastday_of_next_month){ … … 212 212 } 213 213 214 $next_bill_date = date("Y-m-d",strtotime("$next_limite_pay_date - $billdaybefor_annivers ery day")) ;214 $next_bill_date = date("Y-m-d",strtotime("$next_limite_pay_date - $billdaybefor_anniversary day")) ; 215 215 216 216 } … … 280 280 $title = gettext("SUBSCRIPTION INVOICE REMINDER"); 281 281 $description = "Your credit was not enough to pay yours subscription automatically.\n"; 282 $description .= "You have $billdaybefor_annivers ery days to pay this invoice (REF: $reference ) or the account will be automatically disactived \n\n";282 $description .= "You have $billdaybefor_anniversary days to pay this invoice (REF: $reference ) or the account will be automatically disactived \n\n"; 283 283 $value_insert = " '$date' , '$card_id', '$title','$reference','$description',1,0"; 284 284 $instance_table = new Table("cc_invoice", $field_insert); … … 300 300 } 301 301 302 $mail = new Mail(Mail::$TYPE_SUBSCRIPTION_UNPAID, $card['id'] );303 $mail -> replaceInEmail(Mail::$DAY_REMAINING_KEY, $day_remaining);304 $mail -> replaceInEmail(Mail::$INVOICE_REF_KEY, $reference);305 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_FEE, $subscription['fee']);306 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_ID, $subscription['id']);307 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_LABEL, $subscription['product_name']);302 $mail = new Mail(Mail::$TYPE_SUBSCRIPTION_UNPAID, $card['id'] ); 303 $mail -> replaceInEmail(Mail::$DAY_REMAINING_KEY, $billdaybefor_anniversary ); 304 $mail -> replaceInEmail(Mail::$INVOICE_REF_KEY, $reference); 305 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_FEE, $subscription['fee']); 306 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_ID, $subscription['id']); 307 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_LABEL, $subscription['product_name']); 308 308 //insert charge 309 309 $QUERY = "INSERT INTO cc_charge (id_cc_card, amount, chargetype, id_cc_card_subscription, invoiced_status) VALUES ('" . $card['id'] . "', '" . $subscription['fee'] . "', '3','" . $subscription['card_subscription_id'] . "',1)"; … … 344 344 if ($verbose_level >= 1) 345 345 echo "==> UPDATE CARD QUERY: $QUERY\n"; 346 $mail = new Mail(Mail::$TYPE_SUBSCRIPTION_DISABLE_CARD, $card['id'] );347 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_FEE, $subscription['fee']);348 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_ID, $subscription['id']);349 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_LABEL, $subscription['product_name']);346 $mail = new Mail(Mail::$TYPE_SUBSCRIPTION_DISABLE_CARD, $card['id'] ); 347 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_FEE, $subscription['fee']); 348 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_ID, $subscription['id']); 349 $mail -> replaceInEmail(Mail::$SUBSCRIPTION_LABEL, $subscription['product_name']); 350 350 try { 351 351 $mail -> send();
