Revision 2f23933d
Von Sven Schöling vor mehr als 17 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
869 | 869 |
$transdate = $form->datetonum($form->{transdate}, \%myconfig); |
870 | 870 |
$closedto = $form->datetonum($form->{closedto}, \%myconfig); |
871 | 871 |
|
872 |
# ToDO: insert a global check for stornos, so that a storno is only possible a limited time after saving it |
|
872 |
# ToDO: - insert a global check for stornos, so that a storno is only possible a limited time after saving it
|
|
873 | 873 |
print qq|<input class=submit type=submit name=action value="| . $locale->text('Storno') . qq|">| |
874 |
if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ar') && !IS->is_storno(\%myconfig, $form, 'ar')); |
|
874 |
if ($form->{id} && !IS->has_storno(\%myconfig, $form, 'ar') && !IS->is_storno(\%myconfig, $form, 'ar') && !$form->{paid_1});
|
|
875 | 875 |
|
876 | 876 |
print qq|<input class="submit" type="submit" name="action" id="update_button" value="| . $locale->text('Update') . qq|">\n|; |
877 | 877 |
if ($form->{id}) { |
... | ... | |
1650 | 1650 |
$column_data{invnumber} = |
1651 | 1651 |
"<td><a href=$module?action=edit&id=$ar->{id}&login=$form->{login}&password=$form->{password}&callback=$callback>$ar->{invnumber}</a></td>"; |
1652 | 1652 |
|
1653 |
my $is_storno = $ar->{storno} && IS->is_storno(\%myconfig, $form, 'ar'); #($ar->{invnumber} =~ /^Storno zu/); # ToDO: fix this
|
|
1653 |
my $is_storno = $ar->{storno} && IS->is_storno(\%myconfig, $form, 'ar'); |
|
1654 | 1654 |
my $has_storno = $ar->{storno} && !$is_storno; |
1655 | 1655 |
|
1656 | 1656 |
$column_data{type} = "<td>" . |
... | ... | |
1794 | 1794 |
$form->error($locale->text("Transaction has already been cancelled!")); |
1795 | 1795 |
} |
1796 | 1796 |
|
1797 |
# ToDO: |
|
1798 |
# - nicht anzeigen wenn neue rechnung |
|
1799 |
# - nicht anzeigen wenn schons toniert |
|
1800 |
# - nicht anziegen wenn zahlungen da |
|
1801 |
|
|
1802 |
|
|
1803 |
# my %keep_keys = map { $_, 1 } qw(login password id stylesheet); |
|
1804 |
# map { delete $form->{$_} unless $keep_keys{$_} } keys %{ $form }; |
|
1805 |
# prepare_transaction(); |
|
1806 |
|
|
1807 | 1797 |
# negate amount/taxes |
1808 | 1798 |
for my $i (1 .. $form->{rowcount}) { |
1809 | 1799 |
$form->{"amount_$i"} *= -1; |
Auch abrufbar als: Unified diff
Storno nur anzeigen wenn keine Zahlungen vorhanden sind.
Ausserdem Code aufgeraeumt.