Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/takepos/invoice.php
This commit is contained in:
Laurent Destailleur 2019-08-27 15:56:56 +02:00
commit 12a09b8b2a
2 changed files with 14 additions and 3 deletions

View File

@ -62,6 +62,7 @@ TicketVatGrouped=Group VAT by rate in tickets
AutoPrintTickets=Automatically print tickets
EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant
ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ?
ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ?
History=History
ValidateAndClose=Validate and close
Terminal=Terminal

View File

@ -161,6 +161,7 @@ if ($action == 'valid' && $user->rights->facture->creer)
$invoice->update($user);
}
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
if ($invoice->statut != Facture::STATUS_DRAFT)
{
dol_syslog("Sale already validated");
@ -171,11 +172,11 @@ if ($action == 'valid' && $user->rights->facture->creer)
dol_syslog("Sale without lines");
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1);
}
elseif (! empty($conf->stock->enabled) && $conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"]} != "1")
elseif (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1")
{
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
dol_syslog("Validate invoice with stock change into warehouse id ".$constantforkey);
$invoice->validate($user, '', $conf->global->$cosntantforkey);
$invoice->validate($user, '', $conf->global->$constantforkey);
}
else
{
@ -717,8 +718,17 @@ if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takep
$soc = new Societe($db);
if ($invoice->socid > 0) $soc->fetch($invoice->socid);
else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]});
print '<p style="font-size:120%;" class="right">';
print '<!-- Show customer --><p style="font-size:120%;" class="right">';
print $langs->trans("Customer").': '.$soc->name;
$constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.$_SESSION["takeposterminal"];
if (! empty($conf->stock->enabled) && $conf->global->$constantforkey != "1")
{
$constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"];
$warehouse = new Entrepot($db);
$warehouse->fetch($conf->global->$constantforkey);
print '<br>'.$langs->trans("Warehouse").': '.$warehouse->ref;
}
print '</p>';
// Module Adherent