Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3fcf64fc

Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt

  • ID 3fcf64fc989a816e02251ea66fdc2bb0552cd3bb
  • Vorgänger 9ed4151c
  • Nachfolger 30645d2c

Versandort und Steuersatz (Zone) im Auftragsbericht filter- und anzeigbar

Unterschiede anzeigen:

bin/mozilla/oe.pl
48 48
use Data::Dumper;
49 49

  
50 50
use SL::DB::Customer;
51
use SL::DB::TaxZone;
51 52

  
52 53
require "bin/mozilla/io.pl";
53 54
require "bin/mozilla/arap.pl";
......
722 723
  $form->get_lists("projects"     => { "key" => "ALL_PROJECTS", "all" => 1 },
723 724
                   "departments"  => "ALL_DEPARTMENTS",
724 725
                   "$form->{vc}s" => "ALL_VC",
725
                   "business_types" => "ALL_BUSINESS_TYPES");
726
                   "taxzones"     => "ALL_TAXZONES",
727
                   "business_types" => "ALL_BUSINESS_TYPES",);
726 728
  $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ deleted => 0 ]);
727 729

  
728 730
  # constants and subs for template
......
792 794
    "delivered",               "periodic_invoices",
793 795
    "marge_total",             "marge_percent",
794 796
    "vcnumber",                "ustid",
795
    "country",
797
    "country",                 "shippingpoint",
798
    "taxzone",
796 799
  );
797 800

  
798 801
  # only show checkboxes if gotten here via sales_order form.
......
831 834
  push @hidden_variables, "l_subtotal", $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered ordnumber quonumber
832 835
                                                        transaction_description transdatefrom transdateto type vc employee_id salesman_id
833 836
                                                        reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
834
                                                        business_id);
837
                                                        business_id shippingpoint taxzone_id);
835 838

  
836
  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
839
  my   @keys_for_url = grep { $form->{$_} } @hidden_variables;
840
  push @keys_for_url, 'taxzone_id' if $form->{taxzone_id} ne ''; # taxzone_id could be 0
841

  
842
  my $href = build_std_url('action=orders', @keys_for_url);
837 843

  
838 844
  my %column_defs = (
839 845
    'ids'                     => { 'text' => '', },
......
861 867
    'country'                 => { 'text' => $locale->text('Country'), },
862 868
    'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
863 869
    'periodic_invoices'       => { 'text' => $locale->text('Per. Inv.'), },
870
    'shippingpoint'           => { 'text' => $locale->text('Shipping Point'), },
871
    'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
864 872
  );
865 873

  
866
  foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description)) {
874
  foreach my $name (qw(id transdate reqdate quonumber ordnumber name employee salesman shipvia transaction_description shippingpoint taxzone)) {
867 875
    my $sortdir                 = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
868 876
    $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
869 877
  }
......
888 896
  push @options, $locale->text('Order Number')            . " : $form->{ordnumber}"                       if $form->{ordnumber};
889 897
  push @options, $locale->text('Notes')                   . " : $form->{notes}"                           if $form->{notes};
890 898
  push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"         if $form->{transaction_description};
899
  push @options, $locale->text('Shipping Point')          . " : $form->{shippingpoint}"                   if $form->{shippingpoint};
891 900
  if ( $form->{transdatefrom} or $form->{transdateto} ) {
892 901
    push @options, $locale->text('Order Date');
893 902
    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
......
908 917
    my $vc_type_label = $form->{vc} eq 'customer' ? $locale->text('Customer type') : $locale->text('Vendor type');
909 918
    push @options, $vc_type_label . " : " . SL::DB::Business->new(id => $form->{business_id})->load->description;
910 919
  }
920
  if ($form->{taxzone_id} ne '') { # taxzone_id could be 0
921
    push @options, $locale->text('Steuersatz') . " : " . SL::DB::TaxZone->new(id => $form->{taxzone_id})->load->description;
922
  }
911 923

  
912 924
  $report->set_options('top_info_text'        => join("\n", @options),
913 925
                       'raw_top_info_text'    => $form->parse_html_template('oe/orders_top'),

Auch abrufbar als: Unified diff