Add common cart summary template variables to the PayDriver. Add a summary screen for Cash. i18n fixes for Cash.
This commit is contained in:
parent
d48d9bc90f
commit
a472f9ebdd
5 changed files with 106 additions and 67 deletions
|
|
@ -78,15 +78,11 @@ The amount to calculate the deduction against. Defaults to calculateTotal().
|
|||
|
||||
sub calculateShopCreditDeduction {
|
||||
my ($self, $total) = @_;
|
||||
# cannot use in-shop credit on recurring items
|
||||
foreach my $item (@{$self->getItems}) {
|
||||
if ($item->getSku->isRecurring) {
|
||||
return $self->formatCurrency(0);
|
||||
}
|
||||
}
|
||||
unless (defined $total) {
|
||||
$total = $self->calculateTotal
|
||||
}
|
||||
# cannot use in-shop credit on recurring items
|
||||
return $self->formatCurrency(0) if $self->requiresRecurringPayment;
|
||||
return $self->formatCurrency(WebGUI::Shop::Credit->new($self->session, $self->get('posUserId'))->calculateDeduction($total));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue