Revision 4a1b6455
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
909 | 909 |
$main::lxdebug->leave_sub(); |
910 | 910 |
} |
911 | 911 |
|
912 |
sub setup_ar_search_action_bar { |
|
913 |
my %params = @_; |
|
914 |
|
|
915 |
for my $bar ($::request->layout->get('actionbar')) { |
|
916 |
$bar->add( |
|
917 |
action => [ |
|
918 |
$::locale->text('Search'), |
|
919 |
submit => [ '#form' ], |
|
920 |
accesskey => 'enter', |
|
921 |
], |
|
922 |
); |
|
923 |
} |
|
924 |
} |
|
925 |
|
|
926 |
sub setup_ar_transactions_action_bar { |
|
927 |
my %params = @_; |
|
928 |
|
|
929 |
for my $bar ($::request->layout->get('actionbar')) { |
|
930 |
$bar->add( |
|
931 |
action => [ |
|
932 |
$::locale->text('Print'), |
|
933 |
call => [ 'kivi.MassInvoiceCreatePrint.showMassPrintOptionsOrDownloadDirectly' ], |
|
934 |
disabled => !$params{num_rows} ? $::locale->text('The report doesn\'t contain entries.') : undef, |
|
935 |
], |
|
936 |
|
|
937 |
combobox => [ |
|
938 |
action => [ $::locale->text('Create new') ], |
|
939 |
action => [ |
|
940 |
$::locale->text('AR Transaction'), |
|
941 |
submit => [ '#create_new_form', { action => 'ar_transaction' } ], |
|
942 |
], |
|
943 |
action => [ |
|
944 |
$::locale->text('Sales Invoice'), |
|
945 |
submit => [ '#create_new_form', { action => 'sales_invoice' } ], |
|
946 |
], |
|
947 |
], # end of combobox "Create new" |
|
948 |
); |
|
949 |
} |
|
950 |
} |
|
951 |
|
|
912 | 952 |
sub search { |
913 | 953 |
$main::lxdebug->enter_sub(); |
914 | 954 |
|
... | ... | |
936 | 976 |
|
937 | 977 |
$::request->layout->add_javascripts("autocomplete_project.js"); |
938 | 978 |
|
979 |
setup_ar_search_action_bar(); |
|
980 |
|
|
939 | 981 |
$form->header; |
940 | 982 |
print $form->parse_html_template('ar/search', { %myconfig }); |
941 | 983 |
|
... | ... | |
1202 | 1244 |
$report->add_separator(); |
1203 | 1245 |
$report->add_data(create_subtotal_row(\%totals, \@columns, \%column_alignment, \@subtotal_columns, 'listtotal')); |
1204 | 1246 |
|
1205 |
$report->generate_with_headers(); |
|
1247 |
$::request->layout->add_javascripts('kivi.MassInvoiceCreatePrint.js'); |
|
1248 |
setup_ar_transactions_action_bar(num_rows => scalar(@{ $form->{AR} })); |
|
1249 |
|
|
1250 |
$report->generate_with_headers(action_bar => 1); |
|
1206 | 1251 |
|
1207 | 1252 |
$main::lxdebug->leave_sub(); |
1208 | 1253 |
} |
Auch abrufbar als: Unified diff
ActionBar: Verwendung in Berichtsfunktion in ar.pl