Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20231016 fix little things #207

Merged
merged 9 commits into from
Oct 16, 2023
2 changes: 1 addition & 1 deletion SL/Controller/BankTransaction.pm
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ sub save_single_bank_transaction {

my ($payment_type, $free_skonto_amount);
if ( defined $::form->{invoice_skontos}->{"$bt_id"} ) {
$payment_type = shift(@{ $::form->{invoice_skontos}->{"$bt_id"} });
$payment_type = shift(@{ $::form->{invoice_skontos}->{"$bt_id"} }) || '';
} else {
$payment_type = 'without_skonto';
}
Expand Down
8 changes: 4 additions & 4 deletions SL/Controller/DispositionManager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ sub action_transfer_to_purchase_order {
controller => 'Order',
action => 'add_from_purchase_basket',
type => 'purchase_order',
basket_item_ids => $basket_item_ids,
vendor_item_ids => $vendor_item_ids,
basket_item_ids => $basket_item_ids || [],
vendor_item_ids => $vendor_item_ids || [],
vendor_id => $vendor_id,
);
}
Expand Down Expand Up @@ -253,9 +253,9 @@ sub _get_parts {
LEFT JOIN warehouse w ON inv.warehouse_id = w.id
WHERE NOT w.invalid
GROUP BY inv.parts_id

UNION ALL

SELECT p.id, 0 as sum
FROM parts p
WHERE p.id NOT IN ( SELECT distinct parts_id from inventory)
Expand Down
4 changes: 2 additions & 2 deletions SL/Controller/SalesPurchase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ sub action_check_duplicate_invnumber {
);
# we are modifying a existing daily booking - allow this if
# booking conditions are not super strict
undef $exists_ap if ($::instance_conf->get_ap_changeable != 0
undef $exists_ap if ($exists_ap
&& $::instance_conf->get_ap_changeable != 0
&& $exists_ap->gldate == DateTime->today_local);


$_[0]->render(\ !!$exists_ap, { type => 'text' });
}

Expand Down
4 changes: 2 additions & 2 deletions SL/Controller/TimeRecording.pm
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ sub prepare_report {
order => { text => t8('Sales Order'), sub => sub { $_[0]->order && $_[0]->order->number } },
customer => { text => t8('Customer'), sub => sub { $_[0]->customer->displayable_name } },
part => { text => t8('Article'), sub => sub { $_[0]->part && $_[0]->part->displayable_name } },
project => { text => t8('Project'), sub => sub { $_[0]->project && $_[0]->project->full_description(sytle => 'both') } },
project => { text => t8('Project'), sub => sub { $_[0]->project && $_[0]->project->displayable_namefull_description(style => 'both') } },
description => { text => t8('Description'), sub => sub { $_[0]->description_as_stripped_html },
raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?)
obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) } },
Expand Down Expand Up @@ -373,7 +373,7 @@ sub make_filter_summary {
my @filter_strings;

my $staff_member = $filter->{staff_member_id} ? SL::DB::Employee->new(id => $filter->{staff_member_id})->load->safe_name : '';
my $project = $filter->{project_id} ? SL::DB::Project->new (id => $filter->{project_id}) ->load->full_description(sytle => 'both') : '';
my $project = $filter->{project_id} ? SL::DB::Project->new (id => $filter->{project_id}) ->load->full_description(style => 'both') : '';

my @filters = (
[ $filter->{"date:date::ge"}, t8('From Date') ],
Expand Down
2 changes: 1 addition & 1 deletion SL/WH.pm
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ sub get_warehouse_report {
qw(l_parts_id l_qty l_partunit) );

# add cvar for sorting
if ($form->{sort} =~ /^cvar_/) {
if (($form->{sort} // '') =~ /^cvar_/) {
my $sort_name = $form->{sort};
my $cvar_name = $sort_name;
$cvar_name =~ s/^cvar_//;
Expand Down
1 change: 0 additions & 1 deletion locale/de/all
Original file line number Diff line number Diff line change
Expand Up @@ -4996,7 +4996,6 @@ $ ./scripts/installation_check.pl',
'missing' => 'Fehlbestand',
'missing file for action import' => 'Es wurde keine Datei zum Hochladen ausgewählt',
'missing_br' => 'Fehl.',
'mobile version' => 'Mobil-Version',
'month' => 'Monatliche Abgabe',
'monthly' => 'monatlich',
'more' => 'mehr',
Expand Down
1 change: 0 additions & 1 deletion locale/en/all
Original file line number Diff line number Diff line change
Expand Up @@ -4994,7 +4994,6 @@ $self->{texts} = {
'missing' => '',
'missing file for action import' => '',
'missing_br' => 'missing',
'mobile version' => '',
'month' => '',
'monthly' => '',
'more' => '',
Expand Down
1 change: 1 addition & 0 deletions t/006spellcheck.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ sekf
seperat
substract
sucess
sytle
unkown
varsion
wether
Expand Down
12 changes: 6 additions & 6 deletions templates/design40_webpages/client_config/_features.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@
</tr>
<tr>
<th>[% LxERP.t8('Destination URL for sync') %]</td>
<td class="long-desc"> [% L.input_tag('defaults.webdav_sync_extern_url', SELF.defaults.webdav_sync_extern_url, style=style) %]</td>
<td>[% LxERP.t8('Complete URL for WebDAV sync external, including port and folders, i.e.: https://foo.com:4433/owncloud/kivitendo') %]</td>
<td>[% L.input_tag('defaults.webdav_sync_extern_url', SELF.defaults.webdav_sync_extern_url, style=style) %]</td>
<td class="long-desc">[% LxERP.t8('Complete URL for WebDAV sync external, including port and folders, i.e.: https://foo.com:4433/owncloud/kivitendo') %]</td>
</tr>
<tr>
<th>[% LxERP.t8('Login for sync') %]</td>
<td class="long-desc">[% L.input_tag('defaults.webdav_sync_extern_login', SELF.defaults.webdav_sync_extern_login, style=style) %]</td>
<td>[% LxERP.t8('Login for WebDAV sync external') %]</td>
<td>[% L.input_tag('defaults.webdav_sync_extern_login', SELF.defaults.webdav_sync_extern_login, style=style) %]</td>
<td class="long-desc">[% LxERP.t8('Login for WebDAV sync external') %]</td>
</tr>
<tr>
<th>[% LxERP.t8('Password for sync') %]</td>
<td class="long-desc">[% L.input_tag('defaults.webdav_sync_extern_pass', SELF.defaults.webdav_sync_extern_pass, style=style) %]</td>
<td>[% LxERP.t8('Password for WebDAV sync external') %]</td>
<td>[% L.input_tag('defaults.webdav_sync_extern_pass', SELF.defaults.webdav_sync_extern_pass, style=style) %]</td>
<td class="long-desc">[% LxERP.t8('Password for WebDAV sync external') %]</td>
</tr>
<tr>
<th>[% LxERP.t8('Filemanagement') %]</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/design40_webpages/order/tabs/basic_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
[% END %]
<tr id="amount_row_id">
[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
[%- SET marge_class = ((SELF.order.marge_total || 0) < 0) ? 'plus0' : '' -%]
<th colspan="2">[% 'Ertrag' | $T8 %]</th>
<td colspan="2" class="numeric">[%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %]</td>
<th colspan="2">[% 'Ertrag prozentual' | $T8 %]</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/webpages/order/tabs/basic_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
</td>

[%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
[%- SET marge_class = (SELF.order.marge_total < 0) ? 'plus0' : '' -%]
[%- SET marge_class = ((SELF.order.marge_total || 0) < 0) ? 'plus0' : '' -%]
<td>
<table>
<tr>
Expand Down