Merge remote-tracking branch 'Dolibarr/develop' into develop

This commit is contained in:
Nicolas ZABOURI 2019-03-28 17:06:25 +01:00
commit ae5eae1612
10 changed files with 92 additions and 1294 deletions

View File

@ -100,8 +100,8 @@ print '<br>'.$moreinfo;
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)?1:$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled
{
$langs->load("errors");
$warnpicto=img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"');
print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans("WarningMandatorySetupNotComplete").'</a></div>';
$warnpicto=img_warning($langs->trans("WarningEnableYourModulesApplications"), 'style="padding-right: 6px;"');
print '<br><div class="warning"><a href="'.DOL_URL_ROOT.'/admin/modules.php?mainmenu=home">'.$warnpicto.$langs->trans("WarningEnableYourModulesApplications").'</a></div>';
}
print '<br>';
print '<br>';

View File

@ -1053,8 +1053,8 @@ Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Check deposit not done
Delays_MAIN_DELAY_EXPENSEREPORTS=Expense report to approve
SetupDescription1=Before starting to use Dolibarr some initial parameters must be defined and modules enabled/configured.
SetupDescription2=The following two sections are mandatory (the two first entries in the Setup menu):
SetupDescription3=<a href="%s">%s -> %s</a><br>Basic parameters used to customize the default behavior of Dolibarr (e.g for country-related features).
SetupDescription4=<a href="%s">%s -> %s</a><br>Dolibarr ERP/CRM is a collection of many modules/applications, all more or less independent. The modules relevant to your needs must be enabled and configured. New items/options are added to menus with the activation of a module.
SetupDescription3=<a href="%s">%s -> %s</a><br>Basic parameters used to customize the default behavior of your application (e.g for country-related features).
SetupDescription4=<a href="%s">%s -> %s</a><br>This software is a suite of many modules/applications, all more or less independent. The modules relevant to your needs must be enabled and configured. New items/options are added to menus with the activation of a module.
SetupDescription5=Other Setup menu entries manage optional parameters.
LogEvents=Security audit events
Audit=Audit

View File

@ -218,7 +218,8 @@ ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text
ErrorURLMustStartWithHttp=URL %s must start with http:// or https://
# Warnings
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
WarningMandatorySetupNotComplete=Mandatory setup parameters are not yet defined
WarningMandatorySetupNotComplete=Click here to setup mandatory parameters
WarningEnableYourModulesApplications=Click here to enable your modules and applications
WarningSafeModeOnCheckExecDir=Warning, PHP option <b>safe_mode</b> is on so command must be stored inside a directory declared by php parameter <b>safe_mode_exec_dir</b>.
WarningBookmarkAlreadyExists=A bookmark with this title or this target (URL) already exists.
WarningPassIsEmpty=Warning, database password is empty. This is a security hole. You should add a password to your database and change your conf.php file to reflect this.

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2005-2019 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories"));
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories", "cashdesk"));
$action=GETPOST('action', 'alpha');
$massaction=GETPOST('massaction', 'alpha');
@ -47,6 +47,11 @@ $confirm=GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'thirdpartylist';
if ($contextpage == 'poslist')
{
$_GET['optioncss'] = 'print';
}
// Security check
$socid = GETPOST('socid', 'int');
if ($user->societe_id) $socid=$user->societe_id;
@ -150,7 +155,7 @@ if (! empty($conf->global->THIRDPARTY_QUICKSEARCH_ON_FIELDS)) $fieldstosearchall
// Define list of fields to show into list
$checkedcustomercode=(in_array($contextpage, array('thirdpartylist', 'customerlist', 'prospectlist')) ? 1 : 0);
$checkedcustomercode=(in_array($contextpage, array('thirdpartylist', 'customerlist', 'prospectlist', 'poslist')) ? 1 : 0);
$checkedsuppliercode=(in_array($contextpage, array('supplierlist')) ? 1 : 0);
$checkedcustomeraccountcode=(in_array($contextpage, array('customerlist')) ? 1 : 0);
$checkedsupplieraccountcode=(in_array($contextpage, array('supplierlist')) ? 1 : 0);
@ -218,6 +223,25 @@ $object = new Societe($db);
* Actions
*/
if ($action=="change")
{
$idcustomer = GETPOST('idcustomer', 'int');
$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant
$posnb = (GETPOST('posnb', 'int') > 0 ? GETPOST('posnb', 'int') : 0); // $posnb is id of POS
$sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS-".$place.")'";
$resql = $db->query($sql);
?>
<script>
parent.$("#poslines").load("invoice.php?place="+<?php print $place;?>, function() {
//parent.$("#poslines").scrollTop(parent.$("#poslines")[0].scrollHeight);
parent.$.colorbox.close();
});
</script>
<?php
exit;
}
if (GETPOST('cancel', 'alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
@ -468,11 +492,11 @@ if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) &&
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
if (!empty($conf->global->SOCIETE_ON_SEARCH_AND_LIST_GO_ON_CUSTOMER_OR_SUPPLIER_CARD)) {
if ( $obj->client > 0) {
if ($obj->client > 0) {
header("Location: ".DOL_URL_ROOT.'/comm/card.php?socid='.$id);
exit;
}
if ( $obj->fournisseur > 0){
if ($obj->fournisseur > 0) {
header("Location: ".DOL_URL_ROOT.'/fourn/card.php?socid='.$id);
exit;
}
@ -545,7 +569,7 @@ if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend','pre
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
$newcardbutton='';
if ($user->rights->societe->creer)
if ($user->rights->societe->creer && $contextpage != 'poslist')
{
$typefilter='';
$label='MenuNewThirdParty';
@ -975,7 +999,12 @@ while ($i < min($num, $limit))
$companystatic->fk_prospectlevel=$obj->fk_prospectlevel;
$companystatic->fk_parent = $obj->fk_parent;
print '<tr class="oddeven">';
print '<tr class="oddeven"';
if ($contextpage == 'poslist')
{
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.$place.'\'"';
}
print '>';
if (! empty($arrayfields['s.rowid']['checked']))
{
print '<td class="tdoverflowmax50">';
@ -988,7 +1017,14 @@ while ($i < min($num, $limit))
$savalias = $obj->name_alias;
if (! empty($arrayfields['s.name_alias']['checked'])) $companystatic->name_alias='';
print '<td class="tdoverflowmax200">';
print $companystatic->getNomUrl(1, '', 100, 0, 1);
if ($contextpage == 'poslist')
{
print $obj->name;
}
else
{
print $companystatic->getNomUrl(1, '', 100, 0, 1);
}
print "</td>\n";
$companystatic->name_alias = $savalias;
if (! $i) $totalarray['nbfield']++;

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/floors.php
* \ingroup takepos
* \brief Page to edit floors and tables.
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');

View File

@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/floors.php
* \ingroup takepos
* \brief Popup to enter a free line
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
@ -33,7 +39,8 @@ $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $plac
$posnb = (GETPOST('posnb', 'int') > 0 ? GETPOST('posnb', 'int') : 0); // $posnb is id of POS
$idline = GETPOST('idline', 'int');
$action = GETPOST('action');
$action = GETPOST('action', 'alpha');
/*
* View

View File

@ -16,6 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/invoice.php
* \ingroup takepos
* \brief Page to generate section with list of lines
*/
// if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Not disabled cause need to load personalized language
// if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Not disabled cause need to load personalized language
// if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
@ -48,8 +54,8 @@ $amountofpayment = price2num(GETPOST('amount', 'alpha'));
$invoiceid = GETPOST('invoiceid', 'int');
$paycode = $pay;
if ($pay == 'cash') $paycode = 'LIQ'; // For backward compatibility
if ($pay == 'card') $paycode = 'CB'; // For backward compatibility
if ($pay == 'cash') $paycode = 'LIQ'; // For backward compatibility
if ($pay == 'card') $paycode = 'CB'; // For backward compatibility
if ($pay == 'cheque') $paycode = 'CHQ'; // For backward compatibility
// Retrieve paiementid
@ -477,9 +483,11 @@ if ($placeid > 0)
else
{
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>';
}
}
else { // No invoice generated yet
print '<tr class="drag drop oddeven"><td class="left"><span class="opacitymedium">'.$langs->trans("Empty").'</span></td><td></td><td></td><td></td></tr>';
}
print '</table>';

View File

@ -19,6 +19,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/floors.php
* \ingroup takepos
* \brief Page to show a receipt.
*/
require '../main.inc.php'; // Load $user and permissions
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';

View File

@ -16,6 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/floors.php
* \ingroup takepos
* \brief Main TakePOS screen
*/
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled cause need to load personalized language
//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
@ -272,7 +278,7 @@ function deleteline() {
}
function Customer() {
$.colorbox({href:"customers.php?nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Customer");?>"});
$.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"<?php echo $langs->trans("Customer");?>"});
}
function CloseBill() {
@ -493,17 +499,17 @@ if (count($maincategories)==0) {
// User menu and external TakePOS modules
$menus = array();
$r=0;
$menus[$r++]=array('title'=>$langs->trans("SearchProduct"),
$menus[$r++]=array('title'=>'<span class="fas fa-search paddingrightonly"></span>'.$langs->trans("SearchProduct"),
'action'=>'Search();');
$menus[$r++]=array('title'=>$langs->trans("FreeZone"),
'action'=>'FreeZone();');
$menus[$r++]=array('title'=>$langs->trans("Customer"),
$menus[$r++]=array('title'=>'<span class="far fa-building paddingrightonly"></span>'.$langs->trans("Customer"),
'action'=>'Customer();');
$menus[$r++]=array('title'=>$langs->trans("BackOffice"),
$menus[$r++]=array('title'=>'<span class="fa fa-home paddingrightonly"></span>'.$langs->trans("BackOffice"),
'action'=>'window.open(\''.(DOL_URL_ROOT ? DOL_URL_ROOT : '/').'\', \'_backoffice\');');
$menus[$r++]=array('title'=>$langs->trans("DoPayment"),
'action'=>'CloseBill();');
$menus[$r++]=array('title'=>$langs->trans("Logout"),
$menus[$r++]=array('title'=>'<span class="fa fa-sign-out-alt paddingrightonly"></span>'.$langs->trans("Logout"),
'action'=>'window.location.href=\''.DOL_URL_ROOT.'/user/logout.php\';');
// BAR RESTAURANT specific menu