use SL::DB::RecordTemplate;
use SL::DB::SepaExportItem;
use SL::DBUtils qw(like);
-use SL::Presenter;
use List::MoreUtils qw(any);
use List::Util qw(max);
use SL::WH;
use SL::ReportGenerator;
use SL::Locale::String qw(t8);
-use SL::Presenter;
+use SL::Presenter::Tag qw(select_tag);
use SL::DBUtils;
use SL::Helper::Flash;
use SL::Controller::Helper::ReportGenerator;
use English qw(-no_match_vars);
use Rose::Object::MakeMethods::Generic (
- 'scalar --get_set_init' => [ qw(warehouses units p) ],
+ 'scalar --get_set_init' => [ qw(warehouses units) ],
'scalar' => [ qw(warehouse bin unit part) ],
);
SL::DB::Manager::Unit->get_all;
}
-sub init_p {
- SL::Presenter->get;
-}
-
sub set_target_from_part {
my ($self) = @_;
}
sub build_warehouse_select {
- $_[0]->p->select_tag('warehouse_id', $_[0]->warehouses,
+ select_tag('warehouse_id', $_[0]->warehouses,
title_key => 'description',
default => $_[0]->warehouse->id,
onchange => 'reload_bin_selection()',
}
sub build_bin_select {
- $_[0]->p->select_tag('bin_id', [ $_[0]->warehouse->bins ],
+ select_tag('bin_id', [ $_[0]->warehouse->bins ],
title_key => 'description',
default => $_[0]->bin->id,
);
sub build_unit_select {
$_[0]->part->id
- ? $_[0]->p->select_tag('unit_id', $_[0]->part->available_units,
+ ? select_tag('unit_id', $_[0]->part->available_units,
title_key => 'name',
default => $_[0]->part->unit_obj->id,
)
- : $_[0]->p->select_tag('unit_id', $_[0]->units,
+ : select_tag('unit_id', $_[0]->units,
title_key => 'name',
)
}
use SL::Locale::String qw(t8);
use SL::Mailer;
use SL::IS;
+use SL::Presenter::Tag qw(select_tag);
use SL::ReportGenerator;
use SL::Webdav;
use SL::Webdav::File;
$self->js
->replaceWith(
'#letter_cp_id',
- SL::Presenter->get->select_tag('letter.cp_id', $contacts, default => $default, value_key => 'cp_id', title_key => 'full_name')
+ select_tag('letter.cp_id', $contacts, default => $default, value_key => 'cp_id', title_key => 'full_name')
)
->render;
}
project_type => { sub => sub { $_[0]->project_type->description } },
project_status => { sub => sub { $_[0]->project_status->description }, text => t8('Status') },
customer => { sub => sub { !$_[0]->customer_id ? '' : $_[0]->customer->name },
- raw_data => sub { !$_[0]->customer_id ? '' : $self->presenter->customer($_[0]->customer, display => 'table-cell', callback => $callback) } },
+ raw_data => sub { !$_[0]->customer_id ? '' : $_[0]->customer->presenter->customer(display => 'table-cell', callback => $callback) } },
active => { sub => sub { $_[0]->active ? $::locale->text('Active') : $::locale->text('Inactive') },
text => $::locale->text('Active') },
valid => { sub => sub { $_[0]->valid ? $::locale->text('Valid') : $::locale->text('Invalid') },
use SL::DB::ShopOrder;
use SL::JSON;
use SL::Locale::String;
+use SL::Presenter::Record qw(grouped_record_list);
use Rose::Object::MakeMethods::Generic
(
my $linked_records = $self->object->linked_records(direction => 'both', recursive => 1, save_path => 1);
push @{ $linked_records }, $self->object->sepa_export_items if $self->object->can('sepa_export_items');
- my $output = SL::Presenter->get->grouped_record_list(
+ my $output = grouped_record_list(
$linked_records,
with_columns => [ qw(record_link_direction) ],
edit_record_links => 1,
use SL::DB::History;
use SL::DBUtils;
use SL::Shop;
-use SL::Presenter;
use SL::Helper::Flash;
use SL::Locale::String;
use SL::Controller::Helper::ParseFilter;
use SL::DB::AccTransaction;
use SL::DB::Helper::AccountingPeriod qw(get_balance_starting_date);
+use SL::Presenter::Tag qw(checkbox_tag);
+
use Rose::Object::MakeMethods::Generic (
'scalar --get_set_init' => [ qw(charts charts9000 cbob_chart cb_date cb_startdate ob_date cb_reference ob_reference cb_description ob_description) ],
);
my $idx = 1;
my %column_defs = (
- 'ids' => { raw_header_data => $self->presenter->checkbox_tag("", id => "check_all",
+ 'ids' => { raw_header_data => checkbox_tag("", id => "check_all",
checkall => "[data-checkall=1]"), 'align' => 'center' },
'chart' => { text => $::locale->text('Account'), },
'description' => { text => $::locale->text('Description'), },
my $chart_id = $chart->id;
my $row = { map { $_ => { 'data' => '' } } @columns };
$row->{ids} = {
- 'raw_data' => $self->presenter->checkbox_tag("multi_id_${idx}", value => $chart_id, "data-checkall" => 1),
+ 'raw_data' => checkbox_tag("multi_id_${idx}", value => $chart_id, "data-checkall" => 1),
'valign' => 'center',
'align' => 'center',
};
use SL::OE;
use SL::Locale::String qw(t8);
use SL::ReportGenerator;
+use SL::Presenter::Part;
use SL::DB::Part;
my $idx = 0;
foreach my $entry (@contents) {
- $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
- $::request->presenter->classification_abbreviation($entry->{classification_id});
+ $entry->{type_and_classific} = SL::Presenter::Part::type_abbreviation($entry->{part_type}) .
+ SL::Presenter::Part::classification_abbreviation($entry->{classification_id});
$entry->{qty} = $form->format_amount(\%myconfig, $entry->{qty});
$entry->{trans_type} = $locale->text($entry->{trans_type});
foreach my $entry (@contents) {
- $entry->{type_and_classific} = $::request->presenter->type_abbreviation($entry->{part_type}).
- $::request->presenter->classification_abbreviation($entry->{classification_id});
+ $entry->{type_and_classific} = SL::Presenter::Part::type_abbreviation($entry->{part_type}).
+ SL::Presenter::Part::classification_abbreviation($entry->{classification_id});
map { $subtotals{$_} += $entry->{$_} } @subtotals_columns;
$total_stock_value += $entry->{stock_value} * 1;
$entry->{qty} = $form->format_amount(\%myconfig, $entry->{qty});
[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
+[%- USE P %]
[%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
<input name="[% var_name %]" value="[% HTML.escape(var.value) %]">
[%- ELSIF var.type == 'customer' %]
-[% L.customer_vendor_picker(var_name, var.value, type='customer') %]
+[% P.customer_vendor.picker(var_name, var.value, type='customer') %]
[%- ELSIF var.type == 'vendor' %]
-[% L.customer_vendor_picker(var_name, var.value, type='vendor') %]
+[% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
[%- ELSIF var.type == 'part' %]
-[% L.part_picker(var_name, var.value) %]
+[% P.part.picker(var_name, var.value) %]
[%- ELSIF var.type == 'select' %]
[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
+[%- USE P %]
[%- USE LxERP %][%- USE P -%]
[%- BLOCK cvar_inputs %]
[%- SET render_cvar_tag_options = {};
[%- ELSIF cvar.var.type == 'customer' %]
[%- render_cvar_tag_options.type = 'customer' %]
-[%- L.customer_vendor_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
+[%- P.customer_vendor.picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
[%- ELSIF cvar.var.type == 'vendor' %]
[%- render_cvar_tag_options.type = 'vendor' %]
-[%- L.customer_vendor_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
+[%- P.customer_vendor.picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
[%- ELSIF cvar.var.type == 'part' %]
-[% L.part_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
+[% P.part.picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %]
[%- ELSIF cvar.var.type == 'number' %]
[%- L.input_tag(cvar_tag_name, LxERP.format_amount(cvar.value, -2), render_cvar_tag_options) %]
<td>[% IF problem.result == 'error' %][% LxERP.t8("Error") %][% ELSE %][% LxERP.t8("Warning") %][% END %]</td>
<td>
[% FOREACH invoice = problem.invoices %]
- [% P.invoice(invoice) %]
+ [% invoice.presenter.invoice %]
[% UNLESS loop.last %]<br>[% END %]
[% END %]
</td>
-[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%][%- USE P -%]
[% SET style="width: 400px" %]
<h1>[% HTML.escape(title) %]</h1>
<tr>
<th align="right">[% 'Inventory Account' | $T8 %]</th>
[%- IF NOT SELF.config.id %]
- <td>[% L.chart_picker("config.inventory_accno_id", SELF.defaults.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
+ <td>[% P.chart.picker("config.inventory_accno_id", SELF.defaults.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[% L.chart_picker("config.inventory_accno_id", SELF.config.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
+ <td>[% P.chart.picker("config.inventory_accno_id", SELF.config.inventory_accno_id, choose=1, type='IC', style=style) %]</td>
[%- ELSE %]
<td>[%- CHARTLIST.inventory_accno_description %]</td>
[%- END %]
<tr>
<th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(tz.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[% L.chart_picker('income_accno_id_' _ tz.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
+ <td>[% P.chart.picker('income_accno_id_' _ tz.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[% L.chart_picker('income_accno_id_' _ tz.id, CHARTLIST.${tz.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
+ <td>[% P.chart.picker('income_accno_id_' _ tz.id, CHARTLIST.${tz.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${tz.id}.income_accno_description %]</td>
[%- END %]
<tr>
<th align="right">[% 'Expense' | $T8 %] [% HTML.escape(tz.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[% L.chart_picker('expense_accno_id_' _ tz.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
+ <td>[% P.chart.picker('expense_accno_id_' _ tz.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[% L.chart_picker('expense_accno_id_' _ tz.id, CHARTLIST.${tz.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
+ <td>[% P.chart.picker('expense_accno_id_' _ tz.id, CHARTLIST.${tz.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${tz.id}.expense_accno_description %]</td>
[%- END %]
[% USE L %]
+[% USE P %]
[% SET style="width: 400px" %]
<h1>Chart Picker Testpage</h1>
<div>
<p>
-All charts: [% L.chart_picker('chart_id', '', style=style) %]text after icon<br>
-Only booked charts: [% L.chart_picker('chart_id_booked', '', booked=1, style=style) %]<br>
-All charts choose: [% L.chart_picker('chart_id_choose', '', choose=1, style=style) %]<br>
+All charts: [% P.chart.picker('chart_id', '', style=style) %]text after icon<br>
+Only booked charts: [% P.chart.picker('chart_id_booked', '', booked=1, style=style) %]<br>
+All charts choose: [% P.chart.picker('chart_id_choose', '', choose=1, style=style) %]<br>
</p>
<p>
Filter by link:<br>
-AR_paid: [% L.chart_picker('chart_id_ar_paid', undef, type='AR_paid', category='I,A' style=style) %]<br>
-AR: [% L.chart_picker('chart_id_ar', undef, type='AR', style=style) %]<br>
-AP: [% L.chart_picker('chart_id_ap', undef, type='AP', style=style) %]<br>
-AR or AP: [% L.chart_picker('chart_id_arap', undef, type='AR,AP', style=style) %]<br>
-IC_income,IC_sale: [% L.chart_picker('chart_id_icis', undef, type='IC_income,IC_sale', style=style) %]<br>
-IC_expense,IC_cogs: [% L.chart_picker('chart_id_icco', undef, type='IC_expense,IC_cogs', style=style) %]<br>
-IC: [% L.chart_picker('chart_id_ic', undef, type='IC', style=style) %]<br>
+AR_paid: [% P.chart.picker('chart_id_ar_paid', undef, type='AR_paid', category='I,A' style=style) %]<br>
+AR: [% P.chart.picker('chart_id_ar', undef, type='AR', style=style) %]<br>
+AP: [% P.chart.picker('chart_id_ap', undef, type='AP', style=style) %]<br>
+AR or AP: [% P.chart.picker('chart_id_arap', undef, type='AR,AP', style=style) %]<br>
+IC_income,IC_sale: [% P.chart.picker('chart_id_icis', undef, type='IC_income,IC_sale', style=style) %]<br>
+IC_expense,IC_cogs: [% P.chart.picker('chart_id_icco', undef, type='IC_expense,IC_cogs', style=style) %]<br>
+IC: [% P.chart.picker('chart_id_ic', undef, type='IC', style=style) %]<br>
</p>
<p>
Filter by category:<br>
-I: [% L.chart_picker('chart_id_i', undef, category='I', style=style) %]<br>
-IE: [% L.chart_picker('chart_id_ie', undef, category='I,E', style=style) %]<br>
-AQL: [% L.chart_picker('chart_id_aql', undef, category='A,Q,L', style=style) %]<br>
+I: [% P.chart.picker('chart_id_i', undef, category='I', style=style) %]<br>
+IE: [% P.chart.picker('chart_id_ie', undef, category='I,E', style=style) %]<br>
+AQL: [% P.chart.picker('chart_id_aql', undef, category='A,Q,L', style=style) %]<br>
</p>
<p>
Filter by special type:<br>
-GuV: [% L.chart_picker('chart_id_guv', undef, type='guv', style=style) %]<br>
+GuV: [% P.chart.picker('chart_id_guv', undef, type='guv', style=style) %]<br>
</p>
-<p>bank (fat): [% L.chart_picker('bank_id', '', type='bank', fat_set_item=1, choose=1, style=style) %]
+<p>bank (fat): [% P.chart.picker('bank_id', '', type='bank', fat_set_item=1, choose=1, style=style) %]
</p>
<p id="banktext"></p>
<p>
[% FOREACH i IN [ 1 2 3 4 5 6 ] %]
-S [% i %]: [% L.chart_picker('credit_' _ i) %] - H [% i %]: [% L.chart_picker('debit' _ i) %] <br>
+S [% i %]: [% P.chart.picker('credit_' _ i) %] - H [% i %]: [% P.chart.picker('debit' _ i) %] <br>
[% END %]
</p>
<p>
-Pre-filled chart object: [% L.chart_picker('pre_filled_chart_object', pre_filled_chart, style=style) %]<br>
-Pre-filled chart ID: [% L.chart_picker('pre_filled_chart_id', pre_filled_chart.id, style=style) %]<br>
+Pre-filled chart object: [% P.chart.picker('pre_filled_chart_object', pre_filled_chart, style=style) %]<br>
+Pre-filled chart ID: [% P.chart.picker('pre_filled_chart_id', pre_filled_chart.id, style=style) %]<br>
</p>
</div>
-[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%][%- USE T8 -%]
[% SET style="width: 500px" %]
[%# L.dump( SELF.defaults ) %]
<div id="default_accounts">
<tr>
<td align="right">[% LxERP.t8("Inventory Account") %]</td>
<td>
- [% L.chart_picker('defaults.inventory_accno_id', SELF.defaults.inventory_accno_id, type='IC', choose=1, style=style) %]
+ [% P.chart.picker('defaults.inventory_accno_id', SELF.defaults.inventory_accno_id, type='IC', choose=1, style=style) %]
<td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Revenue Account") %]</td>
- <td>[% L.chart_picker('defaults.income_accno_id', SELF.defaults.income_accno_id, type='IC_income,IC_sale', choose=1, style=style) %]</td>
+ <td>[% P.chart.picker('defaults.income_accno_id', SELF.defaults.income_accno_id, type='IC_income,IC_sale', choose=1, style=style) %]</td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Expense Account") %]</td>
- <td>[% L.chart_picker('defaults.expense_accno_id', SELF.defaults.expense_accno_id, type='IC_expense,IC_cogs', choose=1, style=style) %]</td>
+ <td>[% P.chart.picker('defaults.expense_accno_id', SELF.defaults.expense_accno_id, type='IC_expense,IC_cogs', choose=1, style=style) %]</td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Foreign Exchange Gain") %]</td>
- <td>[% L.chart_picker('defaults.fxgain_accno_id', SELF.defaults.fxgain_accno_id, category='I,A', choose=1, style=style) %]<td>
+ <td>[% P.chart.picker('defaults.fxgain_accno_id', SELF.defaults.fxgain_accno_id, category='I,A', choose=1, style=style) %]<td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Foreign Exchange Loss") %]</td>
- <td>[% L.chart_picker('defaults.fxloss_accno_id', SELF.defaults.fxloss_accno_id, category='E,A', choose=1, style=style) %]<td>
+ <td>[% P.chart.picker('defaults.fxloss_accno_id', SELF.defaults.fxloss_accno_id, category='E,A', choose=1, style=style) %]<td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Rounding Gain") %]</td>
- <td>[% L.chart_picker('defaults.rndgain_accno_id', SELF.defaults.rndgain_accno_id, category='I,A', choose=1, style=style) %]</td>
+ <td>[% P.chart.picker('defaults.rndgain_accno_id', SELF.defaults.rndgain_accno_id, category='I,A', choose=1, style=style) %]</td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Rounding Loss") %]</td>
- <td>[% L.chart_picker('defaults.rndloss_accno_id', SELF.defaults.rndloss_accno_id, category='E,A', choose=1, style=style) %]</td>
+ <td>[% P.chart.picker('defaults.rndloss_accno_id', SELF.defaults.rndloss_accno_id, category='E,A', choose=1, style=style) %]</td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Current assets account") %]</td>
- <td>[% L.chart_picker('defaults.ar_paid_accno_id', SELF.defaults.ar_paid_accno_id, type='AR_paid', choose=1, style=style) %]<td>
+ <td>[% P.chart.picker('defaults.ar_paid_accno_id', SELF.defaults.ar_paid_accno_id, type='AR_paid', choose=1, style=style) %]<td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Payable account") %]</td>
- <td>[% L.chart_picker('defaults.ap_chart_id', SELF.defaults.ap_chart_id, type='AP', choose=1, style=style) %]<td>
+ <td>[% P.chart.picker('defaults.ap_chart_id', SELF.defaults.ap_chart_id, type='AP', choose=1, style=style) %]<td>
</tr>
<tr>
<td align="right">[% LxERP.t8("Receivable account") %]</td>
- <td>[% L.chart_picker('defaults.ar_chart_id', SELF.defaults.ar_chart_id, type='AR', choose=1, style=style) %]<td>
+ <td>[% P.chart.picker('defaults.ar_chart_id', SELF.defaults.ar_chart_id, type='AR', choose=1, style=style) %]<td>
</tr>
</table>
<td align="right">[% LxERP.t8('Default article for converting into quotations and orders') %]</td>
<td>
[% IF SELF.h_unit_name %]
- [% P.part_picker('defaults.requirement_spec_section_order_part_id', SELF.defaults.requirement_spec_section_order_part_id, convertible_unit=SELF.h_unit_name, style=style) %]
+ [% P.part.picker('defaults.requirement_spec_section_order_part_id', SELF.defaults.requirement_spec_section_order_part_id, convertible_unit=SELF.h_unit_name, style=style) %]
[% ELSE %]
[% LxERP.t8("Error: this feature requires that articles with a time-based unit (e.g. 'h' or 'min') exist.") %]
[% END %]
<tr><td class="listheading" colspan="4">[% LxERP.t8('Transport and service costs reminder') %]</td></tr>
<tr>
<td align="right">[% LxERP.t8('Default transport article number') %]</td>
- <td>[% L.part_picker('defaults.transport_cost_reminder_article_number_id', SELF.defaults.transport_cost_reminder_article_number_id, style=style) %]</td>
+ <td>[% P.part.picker('defaults.transport_cost_reminder_article_number_id', SELF.defaults.transport_cost_reminder_article_number_id, style=style) %]</td>
<td>[% LxERP.t8('Before saving a sales order, this article will be checked and a warning is generated.') %]</td>
</tr>
-[%- USE HTML -%][%- USE L -%][%- USE LxERP -%][%- USE T8 -%]
+[%- USE HTML -%][%- USE L -%][%- USE LxERP -%][%- USE T8 -%][%- USE P -%]
[%- SET id__ = cvar_cfg.id
name__ = 'filter.cvar.' _ id__
value__ = filter.cvar.$id__ %]
L.select_tag(name__, options__, default=value__, class=cvar_class) %]
[% ELSIF cvar_cfg.type == 'customer' %]
- [%- L.customer_vendor_picker(name__, value__, type='customer', class=cvar_class) %]
+ [%- P.customer_vendor.picker(name__, value__, type='customer', class=cvar_class) %]
[% ELSIF cvar_cfg.type == 'vendor' %]
- [%- L.customer_vendor_picker(name__, value__, type='vendor', class=cvar_class) %]
+ [%- P.customer_vendor.picker(name__, value__, type='vendor', class=cvar_class) %]
[% ELSIF cvar_cfg.type == 'part' %]
- [%- L.part_picker(name__, value__, class=cvar_class) %]
+ [%- P.part.picker(name__, value__, class=cvar_class) %]
[%- ELSE %]
[% SET value_name__ = id__ _ '_substr__ilike'
[%- USE T8 %]
[%- USE HTML %]
[%- USE L %]
+[%- USE P %]
[%- USE LxERP %]
[%- DEFAULT var_name = HTML.escape(cvar_name_prefix) _ HTML.escape(var.config.name) _ HTML.escape(cvar_name_postfix) %]
[%- ELSIF ( var.config.type == 'timestamp' ) %]
[% L.input_tag(var_name, var.value) %]
[%- ELSIF ( var.config.type == 'customer' ) %]
- [% L.customer_vendor_picker(var_name, var.value, type='customer') %]
+ [% P.customer_vendor.picker(var_name, var.value, type='customer') %]
[%- ELSIF ( var.config.type == 'vendor' ) %]
- [% L.customer_vendor_picker(var_name, var.value, type='vendor') %]
+ [% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
[%- ELSIF ( var.config.type == 'part' ) %]
- [% L.part_picker(var_name, var.value) %]
+ [% P.part.picker(var_name, var.value) %]
[%- ELSIF ( var.config.type == 'select' ) %]
[% L.select_tag(var_name, var.config.processed_options, default = var.value) %]
[%- ELSIF ( var.config.type == 'number' ) %]
<tr>
<th align=right>[% is_customer ? LxERP.t8('Customer') : LxERP.t8('Vendor') %]</th>
<td>
- [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="initial_focus", style=style) %]
+ [% P.customer_vendor.picker(vc_id, $vc_id, type=vc, class="initial_focus", style=style) %]
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
</td>
</tr>
<tr>
<th align="right">[%- LxERP.t8('Parts Classification') %]:</th>
<td colspan="10">
- [% P.select_classification('settings.part_classification', default = SELF.profile.get('part_classification'), style = 'width: 300px') %]
+ [% P.part.select_classification('settings.part_classification', default = SELF.profile.get('part_classification'), style = 'width: 300px') %]
</td>
</tr>
<br>
Customer: with preselected id 822<br>
-[% L.customer_vendor_picker('customer_id', 822, type='customer') %]<br>
+[% P.customer_vendor.picker('customer_id', 822, type='customer') %]<br>
<br><hr>
Vendor: <br>
-[% L.customer_vendor_picker('vendor_id', '', type='vendor') %]<br>
+[% P.customer_vendor.picker('vendor_id', '', type='vendor') %]<br>
<br><hr>
customer with fat change<br>
-[% L.customer_vendor_picker('customer_id2', '', type='customer', fat_set_item=1) %]<br>
+[% P.customer_vendor.picker('customer_id2', '', type='customer', fat_set_item=1) %]<br>
<div>id from change <span id='change1'></span></div>
<div>greeting from fat change <span id='change2'></span></div>
<br><hr>
fat vendor with change<br>
-[% L.customer_vendor_picker('vendor_id2', '', type='vendor', fat_set_item=1) %]<br>
+[% P.customer_vendor.picker('vendor_id2', '', type='vendor', fat_set_item=1) %]<br>
<div>id from change<span id='change3'></span></div>
<div>greeting from fat change <span id='change4'></span></div>
<br><hr>
this should have three '-' before and after touching:<br>
----[% L.customer_vendor_picker('vendor5_id', '', type='vendor') %]---
+---[% P.customer_vendor.picker('vendor5_id', '', type='vendor') %]---
<script type='text/javascript'>
[%- USE T8 %]
[%- USE L %]
+[%- USE P %]
[%- USE HTML %]
[%- USE LxERP %]
<table>
<tr>
<th align="right" nowrap>[% 'Part' | $T8 %]</th>
- <td>[% L.part_picker('part_id', SELF.part) %]</td>
+ <td>[% P.part.picker('part_id', SELF.part) %]</td>
</tr>
<tr>
[%- IF SELF.is_sales %]
<tr>
<th align='right'>[% 'Customer' | $T8 %]:</th>
- <td>[% P.customer_vendor_picker('letter.customer_id', letter.customer_id, type='customer') %]</td>
+ <td>[% P.customer_vendor.picker('letter.customer_id', letter.customer_id, type='customer') %]</td>
</tr>
[%- ELSE %]
<tr>
<th align='right'>[% 'Vendor' | $T8 %]:</th>
- <td>[% P.customer_vendor_picker('letter.vendor_id', letter.vendor_id, type='vendor') %]</td>
+ <td>[% P.customer_vendor.picker('letter.vendor_id', letter.vendor_id, type='vendor') %]</td>
</tr>
[%- END %]
<tr>
[% USE HTML %]
[% USE T8 %]
[% USE L %]
+[% USE P %]
[% USE LxERP %]
<form action="controller.pl" method="post" name="Form" id="search_form">
[%- IF SELF.is_sales %]
<tr>
<td align="right">[% 'Customer' | $T8 %]</td>
- <td>[% L.customer_vendor_picker('filter.customer_id', filter.customer_id, type='customer', style='width:250px') %]</td>
+ <td>[% P.customer_vendor.picker('filter.customer_id', filter.customer_id, type='customer', style='width:250px') %]</td>
</tr>
[%- ELSE %]
<tr>
<td align="right">[% 'Vendor' | $T8 %]</td>
- <td>[% L.customer_vendor_picker('filter.vendor_id', filter.vendor_id, type='vendor', style='width:250px') %]</td>
+ <td>[% P.customer_vendor.picker('filter.vendor_id', filter.vendor_id, type='vendor', style='width:250px') %]</td>
</tr>
[%- END %]
<tr>
[%- USE T8 %]
[%- USE L %]
+[%- USE P %]
[%- USE LxERP %]
[%- USE HTML %]
<form action='controller.pl' method='post' id='search_form'>
</tr>
<tr>
<th align="right">[% 'Part' | $T8 %]</th>
- <td>[% L.part_picker('filter.item_type_matches[].part', FORM.filter.item_type_matches.0.part, style='width: 300px') %]</td>
+ <td>[% P.part.picker('filter.item_type_matches[].part', FORM.filter.item_type_matches.0.part, style='width: 300px') %]</td>
</tr>
<tr id='price_rule_filter_customer_tr' [% "style='display:hidden' " UNLESS SELF.vc == 'customer' %]>
<th align="right">[% 'Customer' | $T8 %]</th>
- <td>[% L.customer_vendor_picker('filter.item_type_matches[].customer', FORM.filter.item_type_matches.0.customer, type='customer', id='price_rule_filter_customer', style='width: 300px') %]</td>
+ <td>[% P.customer_vendor.picker('filter.item_type_matches[].customer', FORM.filter.item_type_matches.0.customer, type='customer', id='price_rule_filter_customer', style='width: 300px') %]</td>
</tr>
<tr id='price_rule_filter_vendor_tr' [% "style='display:hidden' " UNLESS SELF.vc == 'customer' %]>
<th align="right">[% 'Vendor' | $T8 %]</th>
- <td>[% L.customer_vendor_picker('filter.item_type_matches[].vendor', FORM.filter.item_type_matches.0.vendor, type='vendor', id='price_rule_filter_vendor', style='width: 300px') %]</td>
+ <td>[% P.customer_vendor.picker('filter.item_type_matches[].vendor', FORM.filter.item_type_matches.0.vendor, type='vendor', id='price_rule_filter_vendor', style='width: 300px') %]</td>
</tr>
<tr>
<th align="right">[% 'Business' | $T8 %]</th>
[%- USE L %]
+[%- USE P %]
[%- USE HTML %]
[%- USE T8 %]
[%- USE LxERP %]
[% L.hidden_tag('price_rule.items[].type', item.type) %]
[%- SWITCH item.type %]
[% CASE 'part' %]
- [% 'Part' | $T8 %] [% 'is' | $T8 %] [% L.part_picker('price_rule.items[].value_int', item.part) %]
+ [% 'Part' | $T8 %] [% 'is' | $T8 %] [% P.part.picker('price_rule.items[].value_int', item.part) %]
[% CASE 'customer' %]
- [% 'Customer' | $T8 %] [% 'is' | $T8 %] [% L.customer_vendor_picker('price_rule.items[].value_int', item.customer, type='customer') %]
+ [% 'Customer' | $T8 %] [% 'is' | $T8 %] [% P.customer_vendor.picker('price_rule.items[].value_int', item.customer, type='customer') %]
[% CASE 'vendor' %]
- [% 'Vendor' | $T8 %] [% 'is' | $T8 %] [% L.customer_vendor_picker('price_rule.items[].value_int', item.vendor, type='vendor') %]
+ [% 'Vendor' | $T8 %] [% 'is' | $T8 %] [% P.customer_vendor.picker('price_rule.items[].value_int', item.vendor, type='vendor') %]
[% CASE 'business' %]
[% 'Type of Business' | $T8 %] [% 'is' | $T8 %] [% L.select_tag('price_rule.items[].value_int', SELF.businesses, title_key='description', default=item.value_int) %]
[% CASE 'partsgroup' %]
<tr>
<th align="right">[% 'Customer' | $T8 %]</th>
-<td>[% L.customer_vendor_picker('project.customer_id', SELF.project.customer_id, type='customer', fat_set_item=1, style='width: 300px', default=SELF.project.customer_id)%] [%- IF SELF.project.customer_id %]
+<td>[% P.customer_vendor.picker('project.customer_id', SELF.project.customer_id, type='customer', fat_set_item=1, style='width: 300px', default=SELF.project.customer_id)%] [%- IF SELF.project.customer_id %]
[%- END %]
</td>
</tr>
[%- USE P %]
- [% P.grouped_record_list(records) %]
+ [% P.record.grouped_list(records) %]
[% USE L %]
+[% USE P %]
<h1>Projekt-Picker-Testpage</h1>
<br>
-[% L.project_picker('project_id', '', style='width: 600px') %] text<br>
+[% P.project.picker('project_id', '', style='width: 600px') %] text<br>
Runtime test:<br>
<div id='runtime_picker'>'
<script>
$(function() {
- $('#runtime_picker').html('[% L.project_picker("project2_id") %]');
+ $('#runtime_picker').html('[% P.project.picker("project2_id") %]');
kivi.reinit_widgets();
})
</script>
[% END %]
<td>[%- HTML.escape(object.$description_column) %]</td>
[% IF project_column %]
- <td>[%- P.project(object.$project_column, no_link=1) %]</td>
+ <td>[%- object.$project_column.presenter.project(no_link=1) %]</td>
[% END %]
</tr>
[%- END %]
[%- USE HTML %]
[%- USE LxERP %]
[%- USE L %]
+[%- USE P %]
[%- USE T8 %]
[%- BLOCK customized_report %]
[%- BLOCK customer %]
<tr>
<th align=right nowrap>[% 'Customer' | $T8 %]</th>
- <td colspan=3>[% L.customer_vendor_picker('customer_id', '', type='customer') %]</td>
+ <td colspan=3>[% P.customer_vendor.picker('customer_id', '', type='customer') %]</td>
</tr>
[%- END %]
[%- BLOCK projectnumber %]
<tr>
<th align=right nowrap>[% 'Project' | $T8 %]</th>
- <td colspan=3>[% L.project_picker('project_id', '') %]</td>
+ <td colspan=3>[% P.project.picker('project_id', '') %]</td>
</tr>
[%- END %]
-[%- USE HTML -%][%- USE LxERP -%][%- USE L -%]
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%]
[% SET style="width: 400px" %]
</tr>
<tr>
<th align="right">[% LxERP.t8('Chart') %]</th>
- <td>[% L.chart_picker('object.chart_id', SELF.object.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, style=style, "data-validate"="required", "data-title"=LxERP.t8("Chart")) %]</td>
+ <td>[% P.chart.picker('object.chart_id', SELF.object.chart_id, type='AR_paid,AP_paid', category='A,L,Q', choose=1, style=style, "data-validate"="required", "data-title"=LxERP.t8("Chart")) %]</td>
</tr>
<tr>
<th align="right">[% LxERP.t8('Obsolete') %]</th>
-[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]<h1>[% HTML.escape(title) %]</h1>
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE P -%][%- USE T8 -%]<h1>[% HTML.escape(title) %]</h1>
[% SET style="width: 400px" %]
<form action="controller.pl" method="post" id="form">
<tr>
<th align="right">[% 'Revenue' | $T8 %] [% HTML.escape(bg.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[% L.chart_picker('income_accno_id_' _ bg.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
+ <td>[% P.chart.picker('income_accno_id_' _ bg.id, SELF.defaults.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[% L.chart_picker('income_accno_id_' _ bg.id, CHARTLIST.${bg.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
+ <td>[% P.chart.picker('income_accno_id_' _ bg.id, CHARTLIST.${bg.id}.income_accno_id, choose=1, type='IC_income,IC_sale', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${bg.id}.income_accno_description %]</td>
[%- END %]
<tr>
<th align="right">[% 'Expense' | $T8 %] [% HTML.escape(bg.description) %]</th>
[%- IF NOT SELF.config.id %]
- <td>[% L.chart_picker('expense_accno_id_' _ bg.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
+ <td>[% P.chart.picker('expense_accno_id_' _ bg.id, SELF.defaults.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSIF SELF.config.id AND SELF.config.orphaned %]
- <td>[% L.chart_picker('expense_accno_id_' _ bg.id, CHARTLIST.${bg.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
+ <td>[% P.chart.picker('expense_accno_id_' _ bg.id, CHARTLIST.${bg.id}.expense_accno_id, choose=1, type='IC_expense,IC_cogs', style=style) %]</td>
[%- ELSE %]
<td>[% CHARTLIST.${bg.id}.expense_accno_description %]</td>
[%- END %]
</td>
<th align="right">[% 'Project Number' | $T8 %]</th>
- <td>[% P.project_picker("project_id", "", style=style) %]</td>
+ <td>[% P.project.picker("project_id", "", style=style) %]</td>
</tr>
<tr>
</tr>
<tr>
<th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th>
- <td>[% P.select_classification('classification_id') %]</td>
+ <td>[% P.part.select_classification('classification_id') %]</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
</tr>
<tr>
<th align="right" nowrap>[% 'Parts Classification' | $T8 %]:</th>
- <td>[% P.select_classification('classification_id') %]</td>
+ <td>[% P.part.select_classification('classification_id') %]</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Part Description' | $T8 %]:</th>
<tr>
<th align="right" nowrap>[% 'Part' | $T8 %]</th>
<td>
- [% P.part_picker("part_id", '', size="30", part_type="part,assembly") %]
+ [% P.part.picker("part_id", '', size="30", part_type="part,assembly") %]
</td>
</tr>
<tr>
<th align="right" nowrap>[% 'Assembly' | $T8 %]</th>
<td>
- [% P.part_picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1") %]
+ [% P.part.picker("parts_id", parts_id, part_type="assembly", class="initial_focus", fat_set_item="1") %]
</td>
</tr>