Revision eaf77a00
Von Tamino Steinert vor 1 Tag hinzugefügt
SL/Controller/POS.pm | ||
---|---|---|
64 | 64 |
); |
65 | 65 |
} |
66 | 66 |
|
67 |
sub action_set_cash_customer { |
|
68 |
my ($self) = @_; |
|
69 |
|
|
70 |
my $cash_customer_id = $::instance_conf->get_pos_cash_customer_id or |
|
71 |
die "No cash customer set in client config\n"; |
|
72 |
my $cash_customer = SL::DB::Manager::Customer->find_by( id => $cash_customer_id ); |
|
73 |
|
|
74 |
return $self->js |
|
75 |
->val('#order_customer_id', $cash_customer->id) |
|
76 |
->val( '#order_customer_id_name', $cash_customer->displayable_name) |
|
77 |
->removeClass('#order_customer_id_name', 'customer-vendor-picker-undefined') |
|
78 |
->addClass( '#order_customer_id_name', 'customer-vendor-picker-picked') |
|
79 |
->run('kivi.Order.reload_cv_dependent_selections') |
|
80 |
->render(); |
|
81 |
} |
|
82 |
|
|
67 | 83 |
sub action_add_discount_item_dialog { |
68 | 84 |
my ($self) = @_; |
69 | 85 |
|
SL/DB/MetaSetup/Default.pm | ||
---|---|---|
156 | 156 |
pdonumber => { type => 'text' }, |
157 | 157 |
pocnumber => { type => 'text' }, |
158 | 158 |
ponumber => { type => 'text' }, |
159 |
pos_cash_customer_id => { type => 'integer' }, |
|
159 | 160 |
pqinumber => { type => 'text' }, |
160 | 161 |
precision => { type => 'numeric', default => '0.01', not_null => 1, precision => 15, scale => 5 }, |
161 | 162 |
print_interpolate_variables_in_positions => { type => 'boolean', default => 'true', not_null => 1 }, |
... | ... | |
295 | 296 |
key_columns => { loss_carried_forward_chart_id => 'id' }, |
296 | 297 |
}, |
297 | 298 |
|
299 |
pos_cash_customer => { |
|
300 |
class => 'SL::DB::Customer', |
|
301 |
key_columns => { pos_cash_customer_id => 'id' }, |
|
302 |
}, |
|
303 |
|
|
298 | 304 |
profit_carried_forward_chart => { |
299 | 305 |
class => 'SL::DB::Chart', |
300 | 306 |
key_columns => { profit_carried_forward_chart_id => 'id' }, |
js/kivi.POS.js | ||
---|---|---|
88 | 88 |
$("#add_discount_item_dialog").dialog("close"); |
89 | 89 |
} |
90 | 90 |
|
91 |
ns.set_cash_customer = function() { |
|
92 |
var data = $('#order_form').serializeArray(); |
|
93 |
data.push({ name: 'action', value: 'POS/set_cash_customer' }); |
|
94 |
|
|
95 |
$.post("controller.pl", data, kivi.eval_json_result); |
|
96 |
} |
|
97 |
|
|
91 | 98 |
ns.submit = function(params) { |
92 | 99 |
if (!kivi.Order.check_cv()) return; |
93 | 100 |
if (!ns.check_items()) return; |
sql/Pg-upgrade2/defaults_add_pos_cash_customer.sql | ||
---|---|---|
1 |
-- @tag: defaults_add_pos_cash_customer |
|
2 |
-- @description: Mandantenkonfiguration für Bargeldkunde der Kasse |
|
3 |
-- @depends: release_3_9_0 |
|
4 |
|
|
5 |
ALTER TABLE defaults ADD COLUMN pos_cash_customer_id INTEGER references customer(id); |
templates/design40_webpages/client_config/_point_of_sale.html | ||
---|---|---|
1 |
[% USE HTML %] |
|
2 |
[% USE LxERP %] |
|
3 |
[% USE L %] |
|
4 |
[% USE T8 %] |
|
5 |
|
|
6 |
<div id="point_of_sale"> |
|
7 |
<div class="wrapper" id="wrapper-3"> |
|
8 |
|
|
9 |
<table class="tbl-horizontal expanded"> |
|
10 |
<caption>[% 'Default Point of Sale' | $T8 %]</caption> |
|
11 |
<colgroup> <col class="wi-normal"><col class="wi-mediumsmall"><col class="wi-verywide"> </colgroup> |
|
12 |
<tbody> |
|
13 |
<tr> |
|
14 |
<th>[% LxERP.t8('Cash customer') %]</th> |
|
15 |
<td> |
|
16 |
[% P.customer_vendor.picker( |
|
17 |
"defaults.pos_cash_customer_id", |
|
18 |
SELF.defaults.pos_cash_customer_id, |
|
19 |
type="customer", |
|
20 |
show_details=0, |
|
21 |
label=LxERP.t8('Customer') |
|
22 |
) %] |
|
23 |
</td> |
|
24 |
<td class="long-desc"> [% LxERP.t8('Customer for cash transactions without additional information.') %]<br> |
|
25 |
</td> |
|
26 |
</tr> |
|
27 |
</tbody> |
|
28 |
</table> |
|
29 |
|
|
30 |
</div><!-- /.wrapper --> |
|
31 |
</div><!-- /#warehouse --> |
templates/design40_webpages/client_config/form.html | ||
---|---|---|
101 | 101 |
<li><a href="#stocktaking">[% LxERP.t8('Stocktaking') %]</a></li> |
102 | 102 |
<li><a href="#record_links">[% LxERP.t8('Linked Records') %]</a></li> |
103 | 103 |
<li><a href="#bank">[% LxERP.t8('SEPA/Bank') %]</a></li> |
104 |
<li><a href="#point_of_sale">[% LxERP.t8('Point Of Sale') %]</a></li> |
|
104 | 105 |
</ul> |
105 | 106 |
|
106 | 107 |
[% PROCESS 'client_config/_ranges_of_numbers.html' %] |
... | ... | |
116 | 117 |
[% PROCESS 'client_config/_stocktaking.html' %] |
117 | 118 |
[% PROCESS 'client_config/_record_links.html' %] |
118 | 119 |
[% PROCESS 'client_config/_bank.html' %] |
120 |
[% PROCESS 'client_config/_point_of_sale.html' %] |
|
119 | 121 |
[% PROCESS 'client_config/_miscellaneous.html' %] |
120 | 122 |
</div> |
121 | 123 |
</form> |
templates/design40_webpages/pos/form.html | ||
---|---|---|
33 | 33 |
label=LxERP.t8('Customer') |
34 | 34 |
) %] |
35 | 35 |
</td> |
36 |
<td>[% L.button_tag("cash_customer", LxERP.t8('Cash customer') ) %]</td> |
|
36 |
[% IF INSTANCE_CONF.get_pos_cash_customer_id %] |
|
37 |
<td>[% L.button_tag( |
|
38 |
'kivi.POS.set_cash_customer()', |
|
39 |
LxERP.t8('Cash customer') |
|
40 |
) %]</td> |
|
41 |
[% END %] |
|
37 | 42 |
<td>[% L.button_tag("cash_customer", LxERP.t8('Create new customer'), class="neutral" ) %]</td> |
38 | 43 |
</tr> |
39 | 44 |
</table> |
Auch abrufbar als: Unified diff
POS: Button für Barkunde