FIX Setup of TakePos was not possible after a clean install
This commit is contained in:
parent
192fb45ce7
commit
12b530c418
@ -38,7 +38,8 @@ function takepos_prepare_head()
|
|||||||
$head[$h][2] = 'setup';
|
$head[$h][2] = 'setup';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
for ($i = 1; $i <= $conf->global->TAKEPOS_NUM_TERMINALS; $i++)
|
$numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
|
||||||
|
for ($i = 1; $i <= $numterminals; $i++)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i;
|
$head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i;
|
||||||
$head[$h][1] = $langs->trans("Terminal"). " ".$i;
|
$head[$h][1] = $langs->trans("Terminal"). " ".$i;
|
||||||
|
|||||||
@ -1923,3 +1923,4 @@ EndPointFor=End point for %s : %s
|
|||||||
DeleteEmailCollector=Delete email collector
|
DeleteEmailCollector=Delete email collector
|
||||||
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
||||||
RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value
|
RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value
|
||||||
|
AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined
|
||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/takepos/admin/setup.php
|
* \file htdocs/takepos/admin/terminal.php
|
||||||
* \ingroup takepos
|
* \ingroup takepos
|
||||||
* \brief Setup page for TakePos module
|
* \brief Setup page for TakePos module
|
||||||
*/
|
*/
|
||||||
@ -129,6 +129,8 @@ print '<tr class="oddeven"><td width=\"50%\">'.$langs->trans("CashDeskThirdParty
|
|||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminaltouse}, 'socid', '(s.client IN (1, 3) AND s.status = 1)', 1, 0, 0, array(), 0);
|
print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminaltouse}, 'socid', '(s.client IN (1, 3) AND s.status = 1)', 1, 0, 0, array(), 0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
$atleastonefound = 0;
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForSell").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountForSell").'</td>';
|
||||||
@ -149,6 +151,7 @@ if (! empty($conf->banque->enabled))
|
|||||||
$name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse;
|
$name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse;
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
|
if (! empty($conf->global->$name)) $atleastonefound++;
|
||||||
$cour=preg_match('/^LIQ.*/', $modep->code)?2:1;
|
$cour=preg_match('/^LIQ.*/', $modep->code)?2:1;
|
||||||
$form->select_comptes($conf->global->$name, $name, 0, "courant=".$cour, 1);
|
$form->select_comptes($conf->global->$name, $name, 0, "courant=".$cour, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -191,6 +194,12 @@ if (! empty($conf->stock->enabled))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
if (empty($atleastonefound) && ! empty($conf->banque->enabled))
|
||||||
|
{
|
||||||
|
print info_admin($langs->trans("AtLeastOneDefaultBankAccountMandatory"), 0, 0, 'error');
|
||||||
|
}
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/takepos/floors.php
|
* \file htdocs/takepos/takepos.php
|
||||||
* \ingroup takepos
|
* \ingroup takepos
|
||||||
* \brief Main TakePOS screen
|
* \brief Main TakePOS screen
|
||||||
*/
|
*/
|
||||||
@ -619,6 +619,7 @@ $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
|
|||||||
$sql.= " WHERE entity IN (".getEntity('c_paiement').")";
|
$sql.= " WHERE entity IN (".getEntity('c_paiement').")";
|
||||||
$sql.= " AND active = 1";
|
$sql.= " AND active = 1";
|
||||||
$sql.= " ORDER BY libelle";
|
$sql.= " ORDER BY libelle";
|
||||||
|
print $sql;
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$paiementsModes = array();
|
$paiementsModes = array();
|
||||||
if ($resql){
|
if ($resql){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user