From: Moritz Bunkus Date: Fri, 27 Apr 2007 12:08:16 +0000 (+0000) Subject: Bei Kundenangeboten, Kundenaufträgen, Lieferantenbestellungen und Lieferantenanfragen... X-Git-Tag: release-2.4.3^2~422 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ce3ce404919a3e39c4b966db7b7d02076cd8c7e5;p=kivitendo-erp.git Bei Kundenangeboten, Kundenaufträgen, Lieferantenbestellungen und Lieferantenanfragen ein Feld "Vorgangsbezeichnung" implementiert. --- diff --git a/SL/OE.pm b/SL/OE.pm index 8e0cfb955..201f5b515 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -66,6 +66,7 @@ sub transactions { qq|SELECT o.id, o.ordnumber, o.transdate, o.reqdate, | . qq| o.amount, ct.name, o.netamount, o.${vc}_id, o.globalproject_id, | . qq| o.closed, o.delivered, o.quonumber, o.shippingpoint, o.shipvia, | . + qq| o.transaction_description, | . qq| ex.$rate AS exchangerate, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee | . @@ -128,6 +129,11 @@ sub transactions { push(@values, conv_date($form->{transdateto})); } + if ($form->{transaction_description}) { + $query .= qq| AND o.transaction_description ILIKE ?|; + push(@values, '%' . $form->{transaction_description} . '%'); + } + my $sortorder = join(', ', ("o.id", $form->sort_columns("transdate", $ordnumber, "name"))); my %allowed_sort_columns = ("transdate" => "o.transdate", @@ -137,7 +143,8 @@ sub transactions { "quonumber" => "o.quonumber", "name" => "ct.name", "employee" => "e.name", - "shipvia" => "o.shipvia"); + "shipvia" => "o.shipvia", + "transaction_description" => "o.transaction_description"); if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) { $sortorder = $allowed_sort_columns{$form->{sort}}; } @@ -407,7 +414,7 @@ Message: $form->{message}\r| if $form->{message}; qq|shippingpoint = ?, shipvia = ?, notes = ?, intnotes = ?, curr = ?, closed = ?, | . qq|delivered = ?, proforma = ?, quotation = ?, department_id = ?, language_id = ?, | . qq|taxzone_id = ?, shipto_id = ?, payment_id = ?, delivery_vendor_id = ?, delivery_customer_id = ?, | . - qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ? | . + qq|globalproject_id = ?, employee_id = ?, salesman_id = ?, cp_id = ?, transaction_description = ? | . qq|WHERE id = ?|; @values = ($form->{ordnumber}, $form->{quonumber}, @@ -425,6 +432,7 @@ Message: $form->{message}\r| if $form->{message}; conv_i($form->{delivery_customer_id}), conv_i($form->{globalproject_id}), conv_i($form->{employee_id}), conv_i($form->{salesman_id}), conv_i($form->{cp_id}), + $form->{transaction_description}, conv_i($form->{id})); do_query($form, $dbh, $query, @values); @@ -669,7 +677,7 @@ sub retrieve { qq| o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber, | . qq| d.description AS department, o.payment_id, o.language_id, o.taxzone_id, | . qq| o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id, | . - qq| o.globalproject_id, o.delivered | . + qq| o.globalproject_id, o.delivered, o.transaction_description | . qq|FROM oe o | . qq|JOIN ${vc} cv ON (o.${vc}_id = cv.id) | . qq|LEFT JOIN employee e ON (o.employee_id = e.id) | . diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6c7cb6569..3c55ee58f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -814,7 +814,11 @@ onchange="document.getElementById('update_button').click();">| . | . $locale->text('Ship via') . qq| - |; + + + | . $locale->text('Transaction description') . qq| + + |; # # # @@ -1461,6 +1465,10 @@ sub search { + + + + @@ -1506,8 +1514,12 @@ sub search { . $locale->text('Tax') . qq| + + + |; + $column_header{transaction_description} = + qq||; $column_header{ids} = qq||; @@ -1786,6 +1800,7 @@ sub orders { $column_data{"delivered"} = ""; + $column_data{transaction_description} = ""; $i++; $i %= 2; diff --git a/doc/dokumentenvorlagen-und-variablen.html b/doc/dokumentenvorlagen-und-variablen.html index fe7d321cb..cb2dd6870 100644 --- a/doc/dokumentenvorlagen-und-variablen.html +++ b/doc/dokumentenvorlagen-und-variablen.html @@ -621,6 +621,10 @@ td { + + + + diff --git a/locale/de/all b/locale/de/all index 1426aee42..046e4a6c8 100644 --- a/locale/de/all +++ b/locale/de/all @@ -1074,6 +1074,7 @@ gestartet', 'Trade Discount' => 'Rabatt', 'Transaction Date missing!' => 'Buchungsdatum fehlt!', 'Transaction deleted!' => 'Buchung gelöscht!', + 'Transaction description' => 'Vorgangsbezeichnung', 'Transaction posted!' => 'Buchung verbucht!', 'Transaction reversal enforced for all dates' => 'Fehleintragungen müssen für jeden Zeitraum mit einer Kontraeintragung ausgebessert werden', 'Transaction reversal enforced up to' => 'Fehleintragungen können bis zu dem angegebenen Zeitraum nur mit einer Kontraeintragung ausgebessert werden!', diff --git a/locale/de/oe b/locale/de/oe index edba44835..78053b3cc 100644 --- a/locale/de/oe +++ b/locale/de/oe @@ -226,6 +226,7 @@ $self->{texts} = { 'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.', 'Total' => 'Summe', 'Trade Discount' => 'Rabatt', + 'Transaction description' => 'Vorgangsbezeichnung', 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', 'Unit' => 'Einheit', 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', diff --git a/sql/Pg-upgrade2/transaction_description.sql b/sql/Pg-upgrade2/transaction_description.sql new file mode 100644 index 000000000..08a0cbbd7 --- /dev/null +++ b/sql/Pg-upgrade2/transaction_description.sql @@ -0,0 +1,6 @@ +-- @tag: transaction_description +-- @description: Neue Spalte für ein Feld "Vorgangsbezeichnung" in Verkaufs- und Einkaufsmasken +-- @depends: release_2_4_2 +ALTER TABLE ap ADD COLUMN transaction_description text; +ALTER TABLE ar ADD COLUMN transaction_description text; +ALTER TABLE oe ADD COLUMN transaction_description text;
$ordlabel
| . $locale->text('Transaction description') . qq|
| . $locale->text("Project Number") . qq| $projectnumber | . $locale->text('Total') . qq|
| . $locale->text('Project Number') . qq| | + . $locale->text('Transaction description') . qq|
| @@ -1553,27 +1565,26 @@ sub orders { $ordnumber = ($form->{type} =~ /_order$/) ? "ordnumber" : "quonumber"; - $number = $form->escape($form->{$ordnumber}); - $name = $form->escape($form->{ $form->{vc} }); - $department = $form->escape($form->{department}); - # construct href - $href = - "$form->{script}?action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; - - # construct callback - $number = $form->escape($form->{$ordnumber}, 1); - $name = $form->escape($form->{ $form->{vc} }, 1); - $department = $form->escape($form->{department}, 1); - - $callback = - "$form->{script}?action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}¬delivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department"; - - @columns = - $form->sort_columns("transdate", "reqdate", "id", "$ordnumber", - "name", "netamount", "tax", "amount", - "curr", "employee", "shipvia", "globalprojectnumber", - "open", "closed", "delivered"); + my @fields = + qw(type vc login password transdatefrom transdateto + open closed notdelivered delivered department + transaction_description); + $href = "$form->{script}?action=orders&" + . join("&", map { "${_}=" . E($form->{$_}) } @fields) + . "&${ordnumber}=" . E($form->{$ordnumber}); + $callback = $href; + + @columns = ( + "transdate", "reqdate", + "id", "$ordnumber", + "name", "netamount", + "tax", "amount", + "curr", "employee", + "shipvia", "globalprojectnumber", + "transaction_description", "open", + "closed", "delivered" + ); $form->{l_open} = $form->{l_closed} = "Y" if ($form->{open} && $form->{closed}); @@ -1667,6 +1678,9 @@ sub orders { $column_header{employee} = qq|$employee| + . $locale->text("Transaction description") . qq|" . ($oe->{"delivered"} ? $locale->text("Yes") : $locale->text("No")) . "" . H($oe->{transaction_description}) . "total Restsumme der Rechnung (Summe abzüglich bereits bezahlter Posten)
transaction_descriptionVorgangsbezeichnung
transdate Auftragsdatum wenn die Rechnung aus einem Auftrag erstellt wurde