Revision 452b5ca8
Von Bernd Bleßmann vor 8 Monaten hinzugefügt
SL/Form.pm | ||
---|---|---|
{ type => SCALAR, callbacks => { is_fx_currency => sub { shift ne $_[1]->[0]->{defaultcurrency} } } }, # should be ISO three letter codes for currency identification (ISO 4217)
|
||
{ type => SCALAR | HASHREF, callbacks => { is_valid_kivi_date => sub { shift =~ m/\d+.\d+.\d+/ } } }, # we have three numbers. Either DateTime or form scalar
|
||
{ type => SCALAR, callbacks => { is_buy_or_sell_rate => sub { shift =~ m/^(buy|sell)$/ } } },
|
||
{ type => SCALAR, callbacks => { is_current_form_id => sub { $_[0] == $_[1]->[0]->{id} } }, optional => 1 },
|
||
{ type => SCALAR | UNDEF, callbacks => { is_current_form_id => sub { $_[0] == $_[1]->[0]->{id} } }, optional => 1 },
|
||
{ type => SCALAR, callbacks => { is_valid_fx_table => sub { shift =~ m/^(ar|ap)$/ } }, optional => 1 }
|
||
);
|
||
my ($self, $myconfig, $currency, $transdate, $fld, $id, $record_table) = @_;
|
Auch abrufbar als: Unified diff
S:Form: check_exchagerate: die id kann bzw. darf auch "undef" sein.
Das gab z.B. einen Fehler beim Neuanlegen einer Debitorenbuchungen für Kunden,
bei denen eine Fremdwärung eingestellt ist.