From: Jan Büren Date: Fri, 13 Dec 2013 13:00:45 +0000 (+0100) Subject: Merge branch 'master' of github.com:kivitendo/kivitendo-erp X-Git-Tag: release-3.1.0beta1~22^2~53^2^2~6 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/19064edf6bd7859e831fdf37cd465f7f933be6f3?hp=d8e323bbf44a0759359d1b727ce6335e7423b22f Merge branch 'master' of github.com:kivitendo/kivitendo-erp --- diff --git a/SL/DB/DeliveryTerm.pm b/SL/DB/DeliveryTerm.pm index 68c5d9282..a6ee350d0 100644 --- a/SL/DB/DeliveryTerm.pm +++ b/SL/DB/DeliveryTerm.pm @@ -1,6 +1,3 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::DeliveryTerm; use strict; @@ -10,6 +7,7 @@ use SL::DB::Manager::DeliveryTerm; use SL::DB::Helper::ActsAsList; use SL::DB::Helper::TranslatedAttributes; +__PACKAGE__->meta->initialize; sub validate { my ($self) = @_; diff --git a/SL/DB/Helper/Mappings.pm b/SL/DB/Helper/Mappings.pm index e8dfb5623..35d601d60 100644 --- a/SL/DB/Helper/Mappings.pm +++ b/SL/DB/Helper/Mappings.pm @@ -120,6 +120,7 @@ my %kivitendo_package_names = ( delivery_orders => 'delivery_order', delivery_order_items => 'delivery_order_item', delivery_order_items_stock => 'delivery_order_items_stock', + delivery_terms => 'delivery_term', department => 'department', drafts => 'draft', dunning => 'dunning', diff --git a/SL/DB/MetaSetup/DeliveryTerm.pm b/SL/DB/MetaSetup/DeliveryTerm.pm index ebcc7eaf1..672aba18d 100644 --- a/SL/DB/MetaSetup/DeliveryTerm.pm +++ b/SL/DB/MetaSetup/DeliveryTerm.pm @@ -6,22 +6,20 @@ use strict; use base qw(SL::DB::Object); -__PACKAGE__->meta->setup( - table => 'delivery_terms', +__PACKAGE__->meta->table('delivery_terms'); - columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - description => { type => 'text' }, - description_long => { type => 'text' }, - sortkey => { type => 'integer', not_null => 1 }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - ], +__PACKAGE__->meta->columns( + description => { type => 'text' }, + description_long => { type => 'text' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + sortkey => { type => 'integer', not_null => 1 }, +); - primary_key_columns => [ 'id' ], +__PACKAGE__->meta->primary_key_columns([ 'id' ]); - allow_inline_column_values => 1, -); +__PACKAGE__->meta->allow_inline_column_values(1); 1; ; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e7515e1d0..d67aac59d 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -843,6 +843,9 @@ sub storno { if (IS->has_storno(\%myconfig, $form, "ar")) { $form->error($locale->text("Invoice has already been storno'd!")); } + if ($form->datetonum($form->{invdate}, \%myconfig) <= $form->datetonum($form->{closedto}, \%myconfig)) { + $form->error($locale->text('Cannot storno invoice for a closed period!')); + } map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form })); diff --git a/js/jquery.checkall.js b/js/jquery.checkall.js index cef64ef8b..00798d8f3 100644 --- a/js/jquery.checkall.js +++ b/js/jquery.checkall.js @@ -7,11 +7,11 @@ ;(function($) { $.fn.extend({ - checkall: function(target, property) { + checkall: function(target, property, inverted) { if (property == null) property = 'checked'; return $(this).click(function() { - $(target).prop(property, $(this).prop('checked')); + $(target).prop(property, inverted ? !$(this).prop('checked') : $(this).prop('checked')); }); } }); diff --git a/locale/de/all b/locale/de/all index ecaa55c2d..175623ea8 100755 --- a/locale/de/all +++ b/locale/de/all @@ -402,6 +402,7 @@ $self->{texts} = { 'Cannot save order!' => 'Auftrag kann nicht gespeichert werden!', 'Cannot save preferences!' => 'Einstellungen können nicht gespeichert werden!', 'Cannot save quotation!' => 'Angebot kann nicht gespeichert werden!', + 'Cannot storno invoice for a closed period!' => 'Das Rechnungsdatum der zu stornierenden Rechnung fällt in einen abgeschlossen Zeitraum!', 'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren', 'Cannot transfer.
Reason:
#1' => 'Kann nicht auslagern.
Grund:
#1', 'Carry over shipping address' => 'Lieferadresse übernehmen', diff --git a/t/rdbo_consistency.t b/t/rdbo_consistency.t index 89d78a557..635585f26 100644 --- a/t/rdbo_consistency.t +++ b/t/rdbo_consistency.t @@ -23,6 +23,7 @@ my %no_metasetup_ok = map { ($_ => 1) } qw(Object.pm VC.pm); my @dbs = find_pms('SL/DB'); my @metasetups = find_pms('SL/DB/MetaSetup'); my %metasetup_content = map { ($_ => scalar(read_file("SL/DB/MetaSetup/$_"))) } @metasetups; +my %db_content = map { ($_ => scalar(read_file("SL/DB/$_"))) } @dbs; my $all_content = read_file('SL/DB/Helper/ALL.pm'); my $mapping_content = read_file('SL/DB/Helper/Mappings.pm'); @@ -78,10 +79,17 @@ sub test_metasetup_has_table_to_class_mapping { } } +sub test_db_contains_meta_initialize { + foreach my $pm (grep { !m{^(?:Object|VC)\.pm$} } @dbs) { + ok($db_content{$pm} =~ m/\n__PACKAGE__->meta->initialize;/, "$pm contains __PACKAGE__->meta->initialize;"); + } +} + test_db_has_metasetup(); test_metasetup_has_db(); test_db_included_in_all(); test_use_in_all_exists_as_db(); test_metasetup_has_table_to_class_mapping(); +test_db_contains_meta_initialize(); done_testing(); diff --git a/templates/webpages/am/edit_units.html b/templates/webpages/am/edit_units.html index c8d6ae717..db3ae6558 100644 --- a/templates/webpages/am/edit_units.html +++ b/templates/webpages/am/edit_units.html @@ -83,7 +83,7 @@ - + @@ -97,7 +97,7 @@ [% FOREACH row = UNITS %] - + [% IF row.in_use %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% 'Delete' | $T8 %] [% 'Unit' | $T8 %] [% 'Base unit' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] diff --git a/templates/webpages/am/list_price_factors.html b/templates/webpages/am/list_price_factors.html index 6b3757b3b..4e91ca3be 100644 --- a/templates/webpages/am/list_price_factors.html +++ b/templates/webpages/am/list_price_factors.html @@ -9,7 +9,7 @@ - + @@ -18,7 +18,7 @@ [% FOREACH factor = PRICE_FACTORS %] - + diff --git a/templates/webpages/am/list_warehouses.html b/templates/webpages/am/list_warehouses.html index 958913a08..dde162cbf 100644 --- a/templates/webpages/am/list_warehouses.html +++ b/templates/webpages/am/list_warehouses.html @@ -8,7 +8,7 @@

[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% 'Description' | $T8 %] [% 'Factor' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% HTML.escape(factor.description) %] [% HTML.escape(factor.factor) %]
- + @@ -16,7 +16,7 @@ [% FOREACH warehouse = WAREHOUSES %] - + diff --git a/templates/webpages/custom_variable_config/list.html b/templates/webpages/custom_variable_config/list.html index 74f90a20e..1f264295f 100644 --- a/templates/webpages/custom_variable_config/list.html +++ b/templates/webpages/custom_variable_config/list.html @@ -11,7 +11,7 @@
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% 'Description' | $T8 %] [% 'Number of bins' | $T8 %] [% 'Invalid' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% HTML.escape(warehouse.description) %] [% HTML.escape(warehouse.number_of_bins) %] [% IF warehouse.invalid %][% 'Yes' | $T8 %][% ELSE %][% 'No' | $T8 %][% END %]
- + @@ -26,7 +26,7 @@ [%- FOREACH cfg = CONFIGS %] - + diff --git a/templates/webpages/customer_vendor/tabs/shipto.html b/templates/webpages/customer_vendor/tabs/shipto.html index 0b238c34b..8f4997772 100644 --- a/templates/webpages/customer_vendor/tabs/shipto.html +++ b/templates/webpages/customer_vendor/tabs/shipto.html @@ -59,7 +59,7 @@ diff --git a/templates/webpages/delivery_term/list.html b/templates/webpages/delivery_term/list.html index b47f9d14e..661e2da57 100644 --- a/templates/webpages/delivery_term/list.html +++ b/templates/webpages/delivery_term/list.html @@ -14,7 +14,7 @@
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% 'Name' | $T8 %] [% 'Description' | $T8 %] [% 'Type' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [% HTML.escape(cfg.name) %][% 'Zipcode' | $T8 %]/[% 'City' | $T8 %] - [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptostreet, size = 5, maxlength = 75) %] + [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptozipcode, size = 5, maxlength = 75) %] [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity, size = 30, maxlength = 75) %]
- + @@ -23,7 +23,7 @@ [%- FOREACH delivery_term = DELIVERY_TERMS %] - +
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [%- 'Description' | $T8 %] [%- 'Long Description' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [%- HTML.escape(delivery_term.description) %] diff --git a/templates/webpages/dunning/show_dunning_bottom.html b/templates/webpages/dunning/show_dunning_bottom.html index e7cad6fcf..f0b225e64 100644 --- a/templates/webpages/dunning/show_dunning_bottom.html +++ b/templates/webpages/dunning/show_dunning_bottom.html @@ -17,7 +17,7 @@ diff --git a/templates/webpages/payment_term/list.html b/templates/webpages/payment_term/list.html index 20533f6e4..41290c2ef 100644 --- a/templates/webpages/payment_term/list.html +++ b/templates/webpages/payment_term/list.html @@ -14,7 +14,7 @@ - + @@ -26,7 +26,7 @@ [%- FOREACH payment_term = PAYMENT_TERMS %] - +
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [%- 'Description' | $T8 %] [%- 'Long Description' | $T8 %] [%- 'Netto Terms' | $T8 %]
[ LxERP.t8('reorder item') %][%- LxERP.t8('reorder item') %] [%- HTML.escape(payment_term.description) %]