Revision 2a6dc538
Von Werner Hahn vor mehr als 1 Jahr hinzugefügt
SL/Controller/DispositionManager.pm | ||
---|---|---|
28 | 28 |
my $basket_part = SL::DB::PurchaseBasketItem->new( |
29 | 29 |
parts_id => $part->id, |
30 | 30 |
qty => $part->ordersize, # was ist wenn order_size < (rop-onhand) ist? sollte dann nicht (rop-onhand) genommen werden? |
31 |
description => $part->description, # Warum wird description zusätzlich gespeichert, parts_id sollte doch reichen? Falls die sich in den Stammdaten in der Zwischenzeit verändert? zumal du in action_transfer_to_purchase_order explizit $part->description verwendest
|
|
31 |
orderer => SL::DB::Manager::Employee->current;
|
|
32 | 32 |
)->save; |
33 | 33 |
} |
34 | 34 |
$self->action_show_basket; |
SL/Controller/Part.pm | ||
---|---|---|
265 | 265 |
my $basket_part = SL::DB::PurchaseBasketItem->new( |
266 | 266 |
parts_id => $self->part->id, |
267 | 267 |
qty => $self->part->ordersize || 1, # was ist wenn order_size < (rop-onhand) ist? sollte dann nicht (rop-onhand) genommen werden? |
268 |
orderer => SL::DB::Manager::Employee->current, |
|
268 | 269 |
)->save; |
269 | 270 |
|
270 | 271 |
$self->js->flash('info', t8('Part added to purchasebasket'))->render; |
... | ... | |
656 | 657 |
paginated => { per_page => 2 }, |
657 | 658 |
with_objects => [ qw(unit_obj classification) ], |
658 | 659 |
); |
660 |
|
|
659 | 661 |
my $exact_matches; |
660 | 662 |
if (1 == scalar @{ $exact_matches = $exact_models->get }) { |
661 | 663 |
$self->parts($exact_matches); |
... | ... | |
1481 | 1483 |
|
1482 | 1484 |
return SL::DB::Manager::PurchaseBasketItem->get_all_count( query => [ parts_id => $self->part->id ] ); |
1483 | 1485 |
} |
1486 |
sub _is_ordered { |
|
1487 |
my ( $self ) = @_; |
|
1488 |
|
|
1489 |
return $self->part->get_ordered_qty( $self->part->id ); |
|
1490 |
} |
|
1491 |
|
|
1484 | 1492 |
|
1485 | 1493 |
sub _setup_form_action_bar { |
1486 | 1494 |
my ($self) = @_; |
... | ... | |
1559 | 1567 |
call => [ 'kivi.Part.add_to_basket' ], |
1560 | 1568 |
disabled => !$self->part->id ? t8('This object has not been saved yet.') |
1561 | 1569 |
: $self->_is_in_purchase_basket ? t8('Part already in purchasebasket') |
1570 |
: $self->_is_ordered ? t8('Part already ordered') |
|
1562 | 1571 |
: !scalar @{$self->part->makemodels} ? t8('No vendors to add to purchasebasket') |
1563 | 1572 |
: undef, |
1564 | 1573 |
], |
SL/DB/MetaSetup/DeliveryOrderItem.pm | ||
---|---|---|
22 | 22 |
longdescription => { type => 'text' }, |
23 | 23 |
marge_price_factor => { type => 'numeric', default => 1, precision => 15, scale => 5 }, |
24 | 24 |
mtime => { type => 'timestamp' }, |
25 |
orderer_id => { type => 'integer' }, |
|
25 | 26 |
ordnumber => { type => 'text' }, |
26 | 27 |
parts_id => { type => 'integer', not_null => 1 }, |
27 | 28 |
position => { type => 'integer', not_null => 1 }, |
... | ... | |
47 | 48 |
key_columns => { delivery_order_id => 'id' }, |
48 | 49 |
}, |
49 | 50 |
|
51 |
orderer => { |
|
52 |
class => 'SL::DB::Employee', |
|
53 |
key_columns => { orderer_id => 'id' }, |
|
54 |
}, |
|
55 |
|
|
50 | 56 |
part => { |
51 | 57 |
class => 'SL::DB::Part', |
52 | 58 |
key_columns => { parts_id => 'id' }, |
SL/DB/MetaSetup/OrderItem.pm | ||
---|---|---|
24 | 24 |
marge_total => { type => 'numeric', precision => 15, scale => 5 }, |
25 | 25 |
mtime => { type => 'timestamp' }, |
26 | 26 |
optional => { type => 'boolean', default => 'false' }, |
27 |
orderer_id => { type => 'integer' }, |
|
27 | 28 |
ordnumber => { type => 'text' }, |
28 | 29 |
parts_id => { type => 'integer' }, |
29 | 30 |
position => { type => 'integer', not_null => 1 }, |
... | ... | |
54 | 55 |
key_columns => { trans_id => 'id' }, |
55 | 56 |
}, |
56 | 57 |
|
58 |
orderer => { |
|
59 |
class => 'SL::DB::Employee', |
|
60 |
key_columns => { orderer_id => 'id' }, |
|
61 |
}, |
|
62 |
|
|
57 | 63 |
part => { |
58 | 64 |
class => 'SL::DB::Part', |
59 | 65 |
key_columns => { parts_id => 'id' }, |
SL/DB/MetaSetup/PurchaseBasketItem.pm | ||
---|---|---|
9 | 9 |
__PACKAGE__->meta->table('purchase_basket_items'); |
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 |
cleared => { type => 'boolean', default => 'false', not_null => 1 },
|
|
13 |
description => { type => 'text' },
|
|
14 |
id => { type => 'serial', not_null => 1 },
|
|
15 |
parts_id => { type => 'integer' },
|
|
16 |
qty => { type => 'numeric', precision => 15, scale => 5 },
|
|
12 |
cleared => { type => 'boolean', default => 'false', not_null => 1 }, |
|
13 |
id => { type => 'serial', not_null => 1 },
|
|
14 |
orderer_id => { type => 'integer' },
|
|
15 |
parts_id => { type => 'integer' }, |
|
16 |
qty => { type => 'numeric', precision => 15, scale => 5 }, |
|
17 | 17 |
); |
18 | 18 |
|
19 | 19 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
20 | 20 |
|
21 | 21 |
__PACKAGE__->meta->foreign_keys( |
22 |
orderer => { |
|
23 |
class => 'SL::DB::Employee', |
|
24 |
key_columns => { orderer_id => 'id' }, |
|
25 |
}, |
|
26 |
|
|
22 | 27 |
part => { |
23 | 28 |
class => 'SL::DB::Part', |
24 | 29 |
key_columns => { parts_id => 'id' }, |
SL/OE.pm | ||
---|---|---|
1289 | 1289 |
o.ordnumber, o.transdate, o.cusordnumber, o.subtotal, o.recurring_billing_mode, o.longdescription, |
1290 | 1290 |
o.price_factor_id, o.price_factor, o.marge_price_factor, o.active_price_source, o.active_discount_source, |
1291 | 1291 |
pr.projectnumber, p.formel, |
1292 |
pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup |
|
1292 |
pg.partsgroup, o.pricegroup_id, (SELECT pricegroup FROM pricegroup WHERE id=o.pricegroup_id) as pricegroup, |
|
1293 |
e.login as orderer |
|
1293 | 1294 |
FROM orderitems o |
1294 | 1295 |
JOIN parts p ON (o.parts_id = p.id) |
1295 | 1296 |
JOIN oe ON (o.trans_id = oe.id) |
... | ... | |
1297 | 1298 |
LEFT JOIN chart c2 ON ((SELECT tc.income_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c2.id) |
1298 | 1299 |
LEFT JOIN chart c3 ON ((SELECT tc.expense_accno_id FROM taxzone_charts tc WHERE tc.taxzone_id = ? and tc.buchungsgruppen_id = p.buchungsgruppen_id) = c3.id) |
1299 | 1300 |
LEFT JOIN project pr ON (o.project_id = pr.id) |
1300 |
LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) | . |
|
1301 |
LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id) |
|
1302 |
LEFT JOIN employee e ON (o.orderer_id = e.id) | . |
|
1301 | 1303 |
($form->{id} |
1302 | 1304 |
? qq|WHERE o.trans_id = ?| |
1303 | 1305 |
: qq|WHERE o.trans_id IN (| . join(", ", map("?", @ids)) . qq|)|) . |
... | ... | |
1524 | 1526 |
my @arrays = |
1525 | 1527 |
qw(runningnumber number description longdescription qty qty_nofmt ship ship_nofmt unit bin |
1526 | 1528 |
partnotes serialnumber reqdate sellprice sellprice_nofmt listprice listprice_nofmt netprice netprice_nofmt |
1529 |
orderer |
|
1527 | 1530 |
discount discount_nofmt p_discount discount_sub discount_sub_nofmt nodiscount_sub nodiscount_sub_nofmt |
1528 | 1531 |
linetotal linetotal_nofmt nodiscount_linetotal nodiscount_linetotal_nofmt tax_rate projectnumber projectdescription |
1529 | 1532 |
price_factor price_factor_name partsgroup weight weight_nofmt lineweight lineweight_nofmt optional); |
bin/mozilla/io.pl | ||
---|---|---|
175 | 175 |
# position of serialnr is used below! |
176 | 176 |
my @row2_sort = qw( |
177 | 177 |
tax_chart tax serialnr projectnr reqdate subtotal recurring_billing_mode marge listprice lastcost onhand |
178 |
orderer |
|
178 | 179 |
); |
179 | 180 |
# serialnr is important for delivery_orders |
180 | 181 |
if ($form->{type} eq 'sales_delivery_order') { |
... | ... | |
212 | 213 |
vendor_partnumber => { width => 8, value => $locale->text('Vendor Part Number'), display => $is_delivery_order && $is_purchase, }, |
213 | 214 |
tax_chart => { value => "", display => $is_purchase && $is_invoice }, |
214 | 215 |
tax => { value => $locale->text('Tax'), display => $is_purchase && $is_invoice }, |
216 |
orderer => { width => 10, value => $locale->text('Orderer'), display => 1, }, |
|
215 | 217 |
); |
216 | 218 |
my @HEADER = map { $column_def{$_} } @header_sort; |
217 | 219 |
|
... | ... | |
497 | 499 |
default => $::form->{"recurring_billing_mode_$i"} || 'always', |
498 | 500 |
); |
499 | 501 |
|
502 |
# Orderer |
|
503 |
$column_data{orderer} = qq|: $form->{"orderer_$i"}|; |
|
504 |
|
|
500 | 505 |
# begin marge calculations |
501 | 506 |
$form->{"lastcost_$i"} *= 1; |
502 | 507 |
$form->{"marge_percent_$i"} = 0; |
locale/de/all | ||
---|---|---|
329 | 329 |
'Already counted' => 'Bereits erfasst', |
330 | 330 |
'Already imported entries (duplicates)' => 'Bereits importierte Einträge (Duplikate)', |
331 | 331 |
'Already imported: ' => 'Bereits importiert:', |
332 |
'Also with reserved Qty' => 'inklusive Reservierungen', |
|
332 | 333 |
'Always edit assembly items (user can change/delete items even if assemblies are already produced)' => 'Erzeugnisbestandteile verändern (Löschen/Umsortieren) auch nachdem dieses Erzeugnis schon produziert wurde.', |
333 | 334 |
'Always edit assortment items (user can change/delete items even if assortments are already used)' => 'Sortimentsbestandteile verändern (Löschen/Umsortieren), auch nachdem dieses Sortiment schon verwendet wurde.', |
334 | 335 |
'Always save orders with a projectnumber (create new projects)' => 'Aufträge immer mit Projektnummer speichern (neue Projekte erstellen)', |
... | ... | |
2594 | 2595 |
'Order/Item row name' => 'Name der Auftrag-/Positions-Zeilen', |
2595 | 2596 |
'Order/Item/Stock row name' => 'Name der Auftrag-/Positions-/Lager-Zeilen', |
2596 | 2597 |
'Order/RFQ Number' => 'Belegnummer', |
2598 |
'Order:' => 'Auftrag:', |
|
2597 | 2599 |
'OrderItem' => 'Position', |
2598 | 2600 |
'Ordered' => 'Von Kunden bestellt', |
2599 | 2601 |
'Ordered qty' => 'bestellt', |
2600 | 2602 |
'Ordered purchase' => 'Bestellte Menge', |
2603 |
'Orderer' => 'BestellerIn', |
|
2601 | 2604 |
'Orders' => 'Aufträge', |
2602 | 2605 |
'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar', |
2603 | 2606 |
'Orders in Webshop' => 'Bestellungen in Webshop', |
... | ... | |
2668 | 2671 |
'Part Type' => 'Artikel-Typ', |
2669 | 2672 |
'Part Unit' => 'Einheit', |
2670 | 2673 |
'Part added to purchasebasket' => 'Zu Einkaufkorb hinzugefügt', |
2671 |
'Part already in purchasebasket' => 'Schon im Einkaufskorb', |
|
2672 | 2674 |
'Part already in purchasebasket or has no vendor' => 'Artikel ist schon im Bestellwarenkorb oder hat keinen Lieferanten', |
2675 |
'Part already in purchasebasket' => 'Schon im Einkaufskorb', |
|
2676 |
'Part already ordered' => 'Artikel ist bestellt', |
|
2673 | 2677 |
'Part classifications' => 'Artikel-Klassifizierungen', |
2674 | 2678 |
'Part marked as "Shop part"' => 'Markiert als Shopartikel', |
2675 | 2679 |
'Part picker' => 'Artikelauswahl', |
... | ... | |
4509 | 4513 |
'VAT ID' => 'USt-IdNr.', |
4510 | 4514 |
'VAT ID and/or taxnumber must be given.' => 'UStId und/oder Steuernummer muss angegeben werden.', |
4511 | 4515 |
'VN' => 'Kred.-Nr.', |
4516 |
'VPE' => '', |
|
4512 | 4517 |
'Valid' => 'Gültig', |
4513 | 4518 |
'Valid are integer values and floating point numbers, e.g. 4.75h = 4 hours and 45 minutes.' => 'Erlaubt sind ganzzahlige Werte und Kommawerte: Beispiel: 4,75h = 4 Stunden und 45 Minuten.', |
4514 | 4519 |
'Valid for Purchase' => 'Gültig für Einkauf', |
templates/webpages/disposition_manager/show_purchase_basket.html | ||
---|---|---|
21 | 21 |
</thead> |
22 | 22 |
<tbody> |
23 | 23 |
[% FOREACH basket_item = BASKET_ITEMS %] |
24 |
|
|
25 |
[% # Dumper.dump_html('TEST') %] |
|
26 |
[% # Dumper.dump_html(basket_item) %] |
|
24 | 27 |
[% SET select_size = basket_item.part.vendor_dropdown.size %] |
25 |
[% IF !basket_item.part.get_ordered_qty(part.id) %] |
|
28 |
[% # IF !basket_item.part.get_ordered_qty(part.id) %]
|
|
26 | 29 |
<tr class="listrow"> |
27 | 30 |
<td>[% L.checkbox_tag('ids[+]', checked = '1', value=basket_item.id) %]</td> |
28 | 31 |
<td>[% HTML.escape(basket_item.part.partnumber) %] </td> |
... | ... | |
32 | 35 |
<td class="numeric">[% basket_item.qty_as_number %] </td> |
33 | 36 |
<td>[% L.select_tag('vendor_ids[]', basket_item.part.vendor_dropdown, value_key = 'value', title_key = 'title', default = basket_item.part.makemodels.item(0).make, size = select_size, style='width: 350px;' ) %]</td> |
34 | 37 |
</tr> |
35 |
[% END %] |
|
38 |
[% # END %]
|
|
36 | 39 |
[% END %] |
37 | 40 |
</tbody> |
38 | 41 |
</table> |
Auch abrufbar als: Unified diff
Dispositionsmanager: Spalte Besteller mit aufgenommen
Eine Extra Spalte BestellerIn und die Ansicht in der
Positionszeile(Details) wer bestellt hat.