checkout over their allowed budget they pay the rest by credit card.
For some reason the function isn't subtracting the budget money and
the whole amount is getting forwarded to the credit card, even if they
have budget money
I have posted the current code. I really appreciate any help!
<?php
if ($user['company_id'] == 47 && $user['current_budget'] > 0) {
echo $form->labelTag('Order/ApplyBudget', 'Apply remaining balance
($'.number_format($user['current_budget'… 2).')');
echo $html->checkbox('Order/ApplyBudget');
if ($user['current_budget'] > $grand_total) {
echo "<p>Because your budget balance is greater than the order total,
your credit card will not be billed if you apply your budget.</p>\n";
}
}
?>
<table border="0" cellpadding="4">
<tr>
<th align="left">Payment Options</th>
</tr>
<tr>
<td>
<?php
if ($payments['Company']['payment_invoice']… {
$options['invoice'] = 'Invoice';
$default = array('value' => 'invoice');
} else {
$default = array('value' => 'creditcard');
}
if ($payments['Company']['payment_cc']) {
$options['creditcard'] = 'Pay now with a credit card';
}
echo $html->radio('Order/PaymentMethod', $options, '<br>', $default);
?>
</td>
</tr>
<tr>
<td colspan="6" class="order_confirm"><input type="submit"
value="Complete Order" class="submit_btn" /></td>
</tr>
</table>
<?php echo $html->input('Order/total', Array('type'=>'hidden',
'value'=> $grand_total + $tax + $shipping)); ?>
<?php echo $html->input('Order/tax', Array('type'=>'hidden', 'value'=>
$tax)); ?>
<?php echo $html->input('Order/shipping', Array('type'=>'hidden',
'value'=> $shipping)); ?>
</form>
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment