Revision eaf77a00
Von Tamino Steinert vor etwa 1 Monat hinzugefügt
SL/Controller/POS.pm | ||
---|---|---|
);
|
||
}
|
||
|
||
sub action_set_cash_customer {
|
||
my ($self) = @_;
|
||
|
||
my $cash_customer_id = $::instance_conf->get_pos_cash_customer_id or
|
||
die "No cash customer set in client config\n";
|
||
my $cash_customer = SL::DB::Manager::Customer->find_by( id => $cash_customer_id );
|
||
|
||
return $self->js
|
||
->val('#order_customer_id', $cash_customer->id)
|
||
->val( '#order_customer_id_name', $cash_customer->displayable_name)
|
||
->removeClass('#order_customer_id_name', 'customer-vendor-picker-undefined')
|
||
->addClass( '#order_customer_id_name', 'customer-vendor-picker-picked')
|
||
->run('kivi.Order.reload_cv_dependent_selections')
|
||
->render();
|
||
}
|
||
|
||
sub action_add_discount_item_dialog {
|
||
my ($self) = @_;
|
||
|
SL/DB/MetaSetup/Default.pm | ||
---|---|---|
pdonumber => { type => 'text' },
|
||
pocnumber => { type => 'text' },
|
||
ponumber => { type => 'text' },
|
||
pos_cash_customer_id => { type => 'integer' },
|
||
pqinumber => { type => 'text' },
|
||
precision => { type => 'numeric', default => '0.01', not_null => 1, precision => 15, scale => 5 },
|
||
print_interpolate_variables_in_positions => { type => 'boolean', default => 'true', not_null => 1 },
|
||
... | ... | |
key_columns => { loss_carried_forward_chart_id => 'id' },
|
||
},
|
||
|
||
pos_cash_customer => {
|
||
class => 'SL::DB::Customer',
|
||
key_columns => { pos_cash_customer_id => 'id' },
|
||
},
|
||
|
||
profit_carried_forward_chart => {
|
||
class => 'SL::DB::Chart',
|
||
key_columns => { profit_carried_forward_chart_id => 'id' },
|
js/kivi.POS.js | ||
---|---|---|
$("#add_discount_item_dialog").dialog("close");
|
||
}
|
||
|
||
ns.set_cash_customer = function() {
|
||
var data = $('#order_form').serializeArray();
|
||
data.push({ name: 'action', value: 'POS/set_cash_customer' });
|
||
|
||
$.post("controller.pl", data, kivi.eval_json_result);
|
||
}
|
||
|
||
ns.submit = function(params) {
|
||
if (!kivi.Order.check_cv()) return;
|
||
if (!ns.check_items()) return;
|
sql/Pg-upgrade2/defaults_add_pos_cash_customer.sql | ||
---|---|---|
-- @tag: defaults_add_pos_cash_customer
|
||
-- @description: Mandantenkonfiguration für Bargeldkunde der Kasse
|
||
-- @depends: release_3_9_0
|
||
|
||
ALTER TABLE defaults ADD COLUMN pos_cash_customer_id INTEGER references customer(id);
|
templates/design40_webpages/client_config/_point_of_sale.html | ||
---|---|---|
[% USE HTML %]
|
||
[% USE LxERP %]
|
||
[% USE L %]
|
||
[% USE T8 %]
|
||
|
||
<div id="point_of_sale">
|
||
<div class="wrapper" id="wrapper-3">
|
||
|
||
<table class="tbl-horizontal expanded">
|
||
<caption>[% 'Default Point of Sale' | $T8 %]</caption>
|
||
<colgroup> <col class="wi-normal"><col class="wi-mediumsmall"><col class="wi-verywide"> </colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<th>[% LxERP.t8('Cash customer') %]</th>
|
||
<td>
|
||
[% P.customer_vendor.picker(
|
||
"defaults.pos_cash_customer_id",
|
||
SELF.defaults.pos_cash_customer_id,
|
||
type="customer",
|
||
show_details=0,
|
||
label=LxERP.t8('Customer')
|
||
) %]
|
||
</td>
|
||
<td class="long-desc"> [% LxERP.t8('Customer for cash transactions without additional information.') %]<br>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
</div><!-- /.wrapper -->
|
||
</div><!-- /#warehouse -->
|
templates/design40_webpages/client_config/form.html | ||
---|---|---|
<li><a href="#stocktaking">[% LxERP.t8('Stocktaking') %]</a></li>
|
||
<li><a href="#record_links">[% LxERP.t8('Linked Records') %]</a></li>
|
||
<li><a href="#bank">[% LxERP.t8('SEPA/Bank') %]</a></li>
|
||
<li><a href="#point_of_sale">[% LxERP.t8('Point Of Sale') %]</a></li>
|
||
</ul>
|
||
|
||
[% PROCESS 'client_config/_ranges_of_numbers.html' %]
|
||
... | ... | |
[% PROCESS 'client_config/_stocktaking.html' %]
|
||
[% PROCESS 'client_config/_record_links.html' %]
|
||
[% PROCESS 'client_config/_bank.html' %]
|
||
[% PROCESS 'client_config/_point_of_sale.html' %]
|
||
[% PROCESS 'client_config/_miscellaneous.html' %]
|
||
</div>
|
||
</form>
|
templates/design40_webpages/pos/form.html | ||
---|---|---|
label=LxERP.t8('Customer')
|
||
) %]
|
||
</td>
|
||
<td>[% L.button_tag("cash_customer", LxERP.t8('Cash customer') ) %]</td>
|
||
[% IF INSTANCE_CONF.get_pos_cash_customer_id %]
|
||
<td>[% L.button_tag(
|
||
'kivi.POS.set_cash_customer()',
|
||
LxERP.t8('Cash customer')
|
||
) %]</td>
|
||
[% END %]
|
||
<td>[% L.button_tag("cash_customer", LxERP.t8('Create new customer'), class="neutral" ) %]</td>
|
||
</tr>
|
||
</table>
|
Auch abrufbar als: Unified diff
POS: Button für Barkunde