Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a325f1b7

Von Jan Büren vor mehr als 15 Jahren hinzugefügt

  • ID a325f1b7554914418f885c43211099baa0ce083c
  • Vorgänger b4078ad9
  • Nachfolger 7dd95f35

Fehlerbehebung fuer Bug 736 - Der beim Lieferanten hinterlegte Rabatt wird in dem Feld Rabatt zu den jeweiligen Positionen vorbelegt (Einkauf > Anfrage/Auftrag und Einkauf -> Einkaufsrechnung erfassen) - Ferner ist der Variablenname jetzt auf form>vendor_discount umbenannt

Unterschiede anzeigen:

SL/IR.pm
866 866
  }
867 867
  my $query =
868 868
    qq|SELECT
869
         v.id AS vendor_id, v.name AS vendor, v.creditlimit, v.terms, v.notes AS intnotes,
869
         v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount, 
870
	 v.creditlimit, v.terms, v.notes AS intnotes,
870 871
         v.email, v.cc, v.bcc, v.language_id, v.payment_id,
871 872
         v.street, v.zipcode, v.city, v.country, v.taxzone_id,
872 873
         $duedate + COALESCE(pt.terms_netto, 0) AS duedate,
bin/mozilla/io.pl
137 137
    {  id => 'partnumber',    width => 8,     value => $locale->text('Number'),               display => 1, },
138 138
    {  id => 'description',   width => 30,    value => $locale->text('Part Description'),     display => 1, },
139 139
    {  id => 'ship',          width => 5,     value => $locale->text('Delivered'),            display => $is_s_p_order, },
140
    {  id => 'qty',           width => 5,     value => $locale->text('Qty'),                  display => 1, },
140
    {  id => 'qty',           width => 5,     value => $locale->text('Wo bin ich'),                  display => 1, },
141 141
    {  id => 'price_factor',  width => 5,     value => $locale->text('Price Factor'),         display => !$is_delivery_order, },
142 142
    {  id => 'unit',          width => 5,     value => $locale->text('Unit'),                 display => 1, },
143 143
    {  id => 'license',       width => 10,    value => $locale->text('License'),              display => 0, },
......
145 145
    {  id => 'projectnr',     width => 10,    value => $locale->text('Project'),              display => 0, },
146 146
    {  id => 'sellprice',     width => 15,    value => $locale->text('Price'),                display => !$is_delivery_order, },
147 147
    {  id => 'sellprice_pg',  width => 8,    value => $locale->text('Pricegroup'),           display => ($form->{type} =~ /^sales_/) && !$is_delivery_order,  },
148
    {  id => 'discount',      width => 5,     value => $locale->text('Discount'),             display => ($form->{vc} eq 'customer') && !$is_delivery_order, },
148
    {  id => 'discount',      width => 5,     value => $locale->text('Discount'),             display => !$is_delivery_order, },
149 149
    {  id => 'linetotal',     width => 10,    value => $locale->text('Extended'),             display => !$is_delivery_order, },
150 150
    {  id => 'bin',           width => 10,    value => $locale->text('Bin'),                  display => 0, },
151 151
    {  id => 'stock_in_out',  width => 10,    value => $stock_in_out_title,                   display => $is_delivery_order, },
bin/mozilla/ir.pl
857 857
  }
858 858

  
859 859
  print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers);
860
  $form->hide_form(qw(rowcount callback draft_id draft_description));
860
  $form->hide_form(qw(rowcount callback draft_id draft_description vendor_discount));
861 861

  
862 862
  # button for saving history
863 863
  if($form->{id} ne "") {
......
876 876
  }
877 877
  # /mark_as_paid button
878 878
print qq|</form>
879

  
880 879
</body>
881 880
</html>
882 881
|;
......
941 940
        # override sellprice if there is one entered
942 941
        $sellprice = $form->parse_amount(\%myconfig, $form->{"sellprice_$i"});
943 942

  
943
	# ergaenzung fuer bug 736 Lieferanten-Rabatt auch in Einkaufsrechnungen vorbelegen jb
944
        $form->{"discount_$i"} = $form->format_amount(\%myconfig, 
945
						      $form->{vendor_discount} * 100 );
944 946
        map { $form->{item_list}[$i]{$_} =~ s/\"/&quot;/g } qw(partnumber description unit);
945 947
        map { $form->{"${_}_$i"} = $form->{item_list}[0]{$_} } keys %{ $form->{item_list}[0] };
946 948

  
bin/mozilla/oe.pl
505 505
    }
506 506

  
507 507
    my $rows = scalar @{ $form->{item_list} };
508

  
508 509
    # hier ist das problem fuer bug 817 $form->{discount} wird nicht durchgeschliffen
509
    $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
510
    # ferner fallunterscheidung fuer verkauf oder einkauf s.a. bug 736	jb 04.05.2009 
511
    # select discount as vendor_discount from vendor || 
512
    # select discount as customer_discount from customer
513
    $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"$form->{vc}_discount"} * 100);
510 514

  
511 515
    if ($rows) {
512 516
      $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
templates/webpages/oe/form_footer_de.html
155 155
    [%- END %]
156 156
  [%- END %]
157 157
[%- END %]
158

  
159 158
<input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
160 159
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
161
<input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
162 160
<input type="hidden" name="callback" value="[% callback %]">
161
[% IF vc == 'customer' %]
162
  <input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
163
[% ELSE %]
164
  <input type="hidden" name="vendor_discount" value="[% HTML.escape(vendor_discount) %]">
165
[% END %]
163 166

  
164 167
</form>
165 168

  
templates/webpages/oe/form_footer_master.html
155 155
    [%- END %]
156 156
  [%- END %]
157 157
[%- END %]
158

  
159 158
<input type="hidden" name="saved_xyznumber" value="[% HTML.escape(saved_xyznumber) %]">
160 159
<input type="hidden" name="rowcount" value="[% HTML.escape(rowcount) %]">
161
<input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
162 160
<input type="hidden" name="callback" value="[% callback %]">
161
[% IF vc == 'customer' %]
162
  <input type="hidden" name="customer_discount" value="[% HTML.escape(customer_discount) %]">
163
[% ELSE %]
164
  <input type="hidden" name="vendor_discount" value="[% HTML.escape(vendor_discount) %]">
165
[% END %]
163 166

  
164 167
</form>
165 168

  

Auch abrufbar als: Unified diff