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 | .
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",
"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}};
}
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},
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);
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) | .
<tr>
<th align=right>| . $locale->text('Ship via') . qq|</th>
<td colspan=3><input name=shipvia size=35 value="$form->{shipvia}"></td>
- </tr>|;
+ </tr>
+ <tr>
+ <th align="right">| . $locale->text('Transaction description') . qq|</th>
+ <td colspan="3"><input name="transaction_description" size="35" value="| . H($form->{transaction_description}) . qq|"></td>
+ </tr>|;
# <tr>
# <td colspan=4>
# <table>
<th align=right>$ordlabel</th>
<td colspan=3><input name="$ordnumber" size=20></td>
</tr>
+ <tr>
+ <th align="right">| . $locale->text('Transaction description') . qq|</th>
+ <td colspan="3"><input name="transaction_description" size=20></td>
+ </tr>
<tr>
<th align="right">| . $locale->text("Project Number") . qq|</th>
<td colspan="3">$projectnumber</td>
. $locale->text('Tax') . qq|</td>
<td><input name="l_amount" class=checkbox type=checkbox value=Y checked> |
. $locale->text('Total') . qq|</td>
+ </tr>
+ <tr>
<td><input name="l_globalprojectnumber" class=checkbox type=checkbox value=Y> |
. $locale->text('Project Number') . qq|</td>
+ <td><input name="l_transaction_description" class=checkbox type=checkbox value=Y> |
+ . $locale->text('Transaction description') . qq|</td>
</tr>
<tr>
<td><input name="l_subtotal" class=checkbox type=checkbox value=Y> |
$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});
$column_header{employee} =
qq|<th><a class=listheading href=$href&sort=employee>$employee</a></th>|;
+ $column_header{transaction_description} =
+ qq|<th><a class=listheading href="$href&sort=transaction_description">|
+ . $locale->text("Transaction description") . qq|</a></th>|;
$column_header{ids} = qq|<th></th>|;
$column_data{"delivered"} = "<td>" .
($oe->{"delivered"} ? $locale->text("Yes") : $locale->text("No")) .
"</td>";
+ $column_data{transaction_description} = "<td>" . H($oe->{transaction_description}) . "</td>";
$i++;
$i %= 2;
<td><code>total</code></td>
<td>Restsumme der Rechnung (Summe abzüglich bereits bezahlter Posten)</td>
</tr>
+ <tr>
+ <td><code>transaction_description</code></td>
+ <td>Vorgangsbezeichnung</td>
+ </tr>
<tr>
<td><code>transdate</code></td>
<td>Auftragsdatum wenn die Rechnung aus einem Auftrag erstellt wurde</td>
'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!',
'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\'.',
--- /dev/null
+-- @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;