use SL::AR;
use SL::AP;
use Data::Dumper;
+use SL::Locale::String qw(t8);
use strict;
#use warnings;
-require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
our ($form, %myconfig, $lxdebug, $locale, $auth);
$auth->assert('cash');
- $::request->layout->add_javascripts("autocomplete_customer.js");
+ $::request->layout->add_javascripts("kivi.CustomerVendor.js");
my ($arap, $exchangerate);
# $locale->text('AR')
# $locale->text('AP')
+ setup_cp_form_action_bar(can_post => !!$form->{rowcount});
+
$form->header;
$arap = lc $form->{ARAP};
$form->{"amount_$i"} = $ref->{amount} / $ref->{exchangerate};
$form->{"due_$i"} =
($ref->{amount} - $ref->{paid}) / $ref->{exchangerate};
- $form->{"checked_$i"} = "";
- $form->{"paid_$i"} = "";
# need to format
map {
$lxdebug->leave_sub();
}
+
+sub setup_cp_form_action_bar {
+ my (%params) = @_;
+
+ for my $bar ($::request->layout->get('actionbar')) {
+ $bar->add(
+ action => [
+ t8('Update'),
+ submit => [ '#form', { action => "update" } ],
+ accesskey => 'enter',
+ ],
+ action => [
+ t8('Post'),
+ submit => [ '#form', { action => "post" } ],
+ ],
+ );
+ }
+}