Revision 49db56d5
Von Jan Büren vor mehr als 2 Jahren hinzugefügt
| SL/Form.pm | ||
|---|---|---|
|                  { isa  => 'Form'},
 | ||
|                  { type => HASHREF, callbacks => { has_yy_in_dateformat => sub { $_[0]->{dateformat} =~ m/yy/ } } },
 | ||
|                  { 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, callbacks  => { is_valid_kivi_date   => sub { shift =~ m/\d+\d+\d+/ } } }, # we have three numers
 | ||
|                  { 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, callbacks  => { is_valid_fx_table    => sub { shift =~ m/(ar|ap)/  } }, optional => 1 }
 | ||
Auch abrufbar als: Unified diff
check_exchangerate: Datum kann DateTime sein (periodic_invoices) und scheint ...
... auch eine gültige SQL-Abfrage zu erzeugen.