Prevent negative prices for products
This commit is contained in:
parent
240ae5f205
commit
ac1c7235f7
1 changed files with 2 additions and 1 deletions
|
@ -21,8 +21,9 @@ sub command :Tab(edit) {
|
|||
|
||||
for my $fields (@products) {
|
||||
next if $command ne $fields->[0];
|
||||
next if $fields->[1] < 0;
|
||||
|
||||
$cart->add(undef, - $fields->[1], $fields->[2]);
|
||||
$cart->add(undef, 0 - $fields->[1], $fields->[2]);
|
||||
return ACCEPT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue