mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-11 10:22:37 +01:00
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: .github/workflows/pre-commit.yml ChangeLog dev/tools/codespell/codespell-lines-ignore.txt htdocs/comm/mailing/card.php htdocs/contact/card.php htdocs/langs/en_US/admin.lang htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
This commit is contained in:
@@ -1,55 +1,55 @@
|
||||
$objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility
|
||||
if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'">';
|
||||
$reponsesadd = str_split($obj->reponses);
|
||||
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
|
||||
$sql .= " SET reponses = '0".$db->escape($obj->reponses)."'";
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||
GETPOST("mouvement", 'int'),
|
||||
jQuery("#mouvement option").removeAttr("selected").change();
|
||||
jQuery("#mouvement option[value=0]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement option[value=1]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement").trigger("change");
|
||||
$action = 'transfert';
|
||||
$this->category->childs[] = $this->_cleanObjectDatas($cat);
|
||||
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
|
||||
//si les reponses ne concerne pas la colonne effacée, on concatenate
|
||||
GETPOST("mouvement", "int"),
|
||||
GETPOST("mouvement", 'alpha'),
|
||||
GETPOST("mouvement", 'int'),
|
||||
if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr("disabled");
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
|
||||
$action = 'transfert';
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, date_creation)';
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, ip, date_creation)';
|
||||
$sql = 'SELECT s.reponses';
|
||||
$sql2 .= " SET reponses = '".$db->escape($newcar)."'";
|
||||
$this->category->childs = array();
|
||||
// mise a jour des reponses utilisateurs dans la base
|
||||
if ($user->hasRight('stock', 'mouvement', 'lire')) {
|
||||
jQuery("#mouvement").change(function() {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
|
||||
$action = 'transfert';
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
|
||||
$sql = "SELECT id_users, nom as name, reponses";
|
||||
$test = '/javas:cript/google.com';
|
||||
$test="<IMG SRC=\"jav
ascript:alert('XSS');\">"; // Same
|
||||
if ($user->hasRight('stock', 'mouvement', 'creer')) {
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$opensurveysondage->mail_admin = $_SESSION['adresse'];
|
||||
$pdf->SetXY($savx, $savy);
|
||||
$savy = $pdf->getY();
|
||||
$somethingshown = $formactions->showactions($object, 'mouvement', 0, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for product
|
||||
$sql .= " SET reponses = '".$db->escape($nouveauchoix)."'";
|
||||
<strong>TaskItem(<em>pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt</em>)</strong></p>
|
||||
if ($action == "transfert") {
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
|
||||
print ajax_combobox("mouvement");
|
||||
public $childs = array();
|
||||
unset($_SESSION["adresse"]);
|
||||
$objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility
|
||||
if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'">';
|
||||
$reponsesadd = str_split($obj->reponses);
|
||||
$sql .= " SET reponses = '".$db->escape($reponsesadd)."'";
|
||||
$sql .= " SET reponses = '0".$db->escape($obj->reponses)."'";
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/product/stock/product.php?dwid='.$object->id.'&id='.$objp->rowid.'&action=transfert&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$id).'">';
|
||||
GETPOST("mouvement", 'int'),
|
||||
jQuery("#mouvement option").removeAttr("selected").change();
|
||||
jQuery("#mouvement option[value=0]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement option[value=1]").attr("selected","selected").trigger("change");
|
||||
jQuery("#mouvement").trigger("change");
|
||||
$action = 'transfert';
|
||||
$this->category->childs[] = $this->_cleanObjectDatas($cat);
|
||||
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
|
||||
//si les reponses ne concerne pas la colonne effacée, on concatenate
|
||||
GETPOST("mouvement", "int"),
|
||||
GETPOST("mouvement", 'alpha'),
|
||||
GETPOST("mouvement", 'int'),
|
||||
if (jQuery("#mouvement").val() == \'0\') jQuery("#unitprice").removeAttr("disabled");
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
|
||||
$action = 'transfert';
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, date_creation)';
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses, ip, date_creation)';
|
||||
$sql = 'SELECT s.reponses';
|
||||
$sql2 .= " SET reponses = '".$db->escape($newcar)."'";
|
||||
$this->category->childs = array();
|
||||
// mise a jour des reponses utilisateurs dans la base
|
||||
if ($user->hasRight('stock', 'mouvement', 'lire')) {
|
||||
jQuery("#mouvement").change(function() {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
|
||||
$action = 'transfert';
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
|
||||
$sql = "SELECT id_users, nom as name, reponses";
|
||||
$test = '/javas:cript/google.com';
|
||||
$test="<IMG SRC=\"jav
ascript:alert('XSS');\">"; // Same
|
||||
if ($user->hasRight('stock', 'mouvement', 'creer')) {
|
||||
$ensemblereponses = $obj->reponses;
|
||||
$opensurveysondage->mail_admin = $_SESSION['adresse'];
|
||||
$pdf->SetXY($savx, $savy);
|
||||
$savy = $pdf->getY();
|
||||
$somethingshown = $formactions->showactions($object, 'mouvement', 0, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for product
|
||||
$sql .= " SET reponses = '".$db->escape($nouveauchoix)."'";
|
||||
<strong>TaskItem(<em>pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt</em>)</strong></p>
|
||||
if ($action == "transfert") {
|
||||
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
|
||||
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
|
||||
print ajax_combobox("mouvement");
|
||||
public $childs = array();
|
||||
unset($_SESSION["adresse"]);
|
||||
$permissiontoadd = $user->rights->stock->mouvement->creer;
|
||||
$permissiontodelete = $user->rights->stock->mouvement->creer; // There is no deletion permission for stock movement as we should never delete
|
||||
$permissiontoread = $user->rights->stock->mouvement->lire;
|
||||
|
||||
@@ -916,7 +916,7 @@ class BookKeeping extends CommonObject
|
||||
} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {
|
||||
$sqlwhere[] = $key.'='.$value;
|
||||
} elseif ($key == 't.subledger_account' || $key == 't.numero_compte') {
|
||||
$sqlwhere[] = $key.' LIKE \''.$this->db->escapeforlike($this->db->escape($value)).'%\'';
|
||||
$sqlwhere[] = $key.' LIKE \''.$this->db->escape($this->db->escapeforlike($value)).'%\'';
|
||||
} elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') {
|
||||
$sqlwhere[] = $key.'\''.$this->db->idate($value).'\'';
|
||||
} elseif ($key == 't.date_export>=' || $key == 't.date_export<=') {
|
||||
|
||||
@@ -2217,7 +2217,7 @@ class Adherent extends CommonObject
|
||||
*/
|
||||
public function getTooltipContentArray($params)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
$langs->loadLangs(['members', 'companies']);
|
||||
$nofetch = !empty($params['nofetch']);
|
||||
|
||||
@@ -392,11 +392,11 @@ if ($mode == 'config' && $user->admin) {
|
||||
print img_picto($langs->trans("Delete"), 'delete', 'class="paddingright"');
|
||||
print '</a>';
|
||||
// test icon
|
||||
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||
print '<a class="marginrightonly nowraponall" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||
print img_picto($langs->trans("TestPrinterDesc"), 'printer', 'class="paddingright paddingleft"').'TXT';
|
||||
print '</a>';
|
||||
// test icon
|
||||
print '<a class="marginrightonly" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter2&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||
print '<a class="marginrightonly nowraponall" href="'.$_SERVER['PHP_SELF'].'?mode=config&action=testprinter2&token='.newToken().'&printerid='.$printer->listprinters[$line]['rowid'].'&printername='.urlencode($printer->listprinters[$line]['name']).'">';
|
||||
print img_picto($langs->trans("TestPrinterDesc2"), 'printer', 'class="paddingright paddingleft"').'IMG';
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
|
||||
@@ -279,6 +279,12 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
|
||||
print '<label for="checkbox_use_force">';
|
||||
print $form->textwithpicto($langs->trans('ExportUseForce'), $langs->trans('ExportUseForceHelp'));
|
||||
print '</label>';
|
||||
print '<br>';
|
||||
|
||||
$execmethod = 0;
|
||||
if (getDolGlobalString('MAIN_EXEC_USE_POPEN')) {
|
||||
$execmethod = getDolGlobalString('MAIN_EXEC_USE_POPEN');
|
||||
|
||||
@@ -149,7 +149,7 @@ if ($object->id > 0) {
|
||||
print dol_get_fiche_head($head, 'documents', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
// Link to other agenda views
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback .= img_picto($langs->trans("BackToList"), 'object_calendarlist', 'class="pictoactionview pictofixedwidth"');
|
||||
$linkback .= '<span class="hideonsmartphone">'.$langs->trans("BackToList").'</span>';
|
||||
$linkback .= '</a>';
|
||||
|
||||
@@ -73,7 +73,7 @@ $head = actions_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'info', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
// Link to other agenda views
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback .= img_picto($langs->trans("BackToList"), 'object_calendarlist', 'class="pictoactionview pictofixedwidth"');
|
||||
$linkback .= '<span class="hideonsmartphone">'.$langs->trans("BackToList").'</span>';
|
||||
$linkback .= '</a>';
|
||||
|
||||
@@ -923,6 +923,12 @@ while ($currentdaytoshow < $lastdaytoshow) {
|
||||
}
|
||||
}
|
||||
$sql .= " AND u.statut = 1";
|
||||
if ($filtert > 0) {
|
||||
$sql .= " AND u.rowid = ".((int) $filtert);
|
||||
}
|
||||
if ($usergroup > 0) {
|
||||
$sql .= " AND ug.fk_usergroup = ".((int) $usergroup);
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
// External users should see only contacts of their company
|
||||
$sql .= " AND u.fk_soc = ".((int) $user->socid);
|
||||
|
||||
@@ -845,7 +845,7 @@ if ($object->id > 0) {
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$object->id.'">'.$langs->trans("AllPropals").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastPropals", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllPropals").'</span><span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
@@ -859,7 +859,8 @@ if ($object->id > 0) {
|
||||
print '<td class="nowraponall">';
|
||||
$propal_static->id = $objp->propalid;
|
||||
$propal_static->ref = $objp->ref;
|
||||
$propal_static->ref_client = $objp->ref_client;
|
||||
$propal_static->ref_client = $objp->ref_client; // deprecated
|
||||
$propal_static->ref_customer = $objp->ref_client;
|
||||
$propal_static->total_ht = $objp->total_ht;
|
||||
$propal_static->total_tva = $objp->total_tva;
|
||||
$propal_static->total_ttc = $objp->total_ttc;
|
||||
@@ -898,7 +899,7 @@ if ($object->id > 0) {
|
||||
print " ".img_warning();
|
||||
}
|
||||
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
|
||||
print '<td class="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
|
||||
print '<td class="right nowraponall">'.price($objp->total_ht).'</td>';
|
||||
print '<td class="right" style="min-width: 60px" class="nowrap">'.$propal_static->LibStatut($objp->fk_statut, 5).'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
@@ -956,7 +957,7 @@ if ($object->id > 0) {
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomerOrders", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->id.'">'.$langs->trans("AllOrders").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastCustomerOrders", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllOrders").'</span><span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
@@ -1009,7 +1010,7 @@ if ($object->id > 0) {
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dc), 'day')."</td>\n";
|
||||
print '<td class="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
|
||||
print '<td class="right nowraponall">'.price($objp->total_ht).'</td>';
|
||||
print '<td class="right" style="min-width: 60px" class="nowrap">'.$commande_static->LibStatut($objp->fk_statut, $objp->facture, 5).'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
@@ -1055,7 +1056,7 @@ if ($object->id > 0) {
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastSendings", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expedition/list.php?socid='.$object->id.'">'.$langs->trans("AllSendings").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td colspan="4"><table class="centpercent nobordernopadding"><tr><td>'.$langs->trans("LastSendings", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/expedition/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllSendings").'</span><span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/expedition/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
@@ -1107,7 +1108,7 @@ if ($object->id > 0) {
|
||||
print '<td class="right"><b>!!!</b></td>';
|
||||
}
|
||||
|
||||
print '<td class="nowrap right" width="100" >'.$sendingstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print '<td class="nowrap right centpercent">'.$sendingstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
@@ -1251,7 +1252,7 @@ if ($object->id > 0) {
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastInterventions", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fichinter/list.php?socid='.$object->id.'">'.$langs->trans("AllInterventions").'<span class="badge marginleftonlyshort">'.$num.'</span></td>';
|
||||
print '<td colspan="3"><table class="centpercent nobordernopadding"><tr><td>'.$langs->trans("LastInterventions", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/fichinter/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllInterventions").'</span><span class="badge marginleftonlyshort">'.$num.'</span></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/fichinter/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
@@ -1347,10 +1348,16 @@ if ($object->id > 0) {
|
||||
if ($num > 0) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '</tr></table></td>';
|
||||
$colspan = 4;
|
||||
if (getDolGlobalString('MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES')) {
|
||||
$colspan++;
|
||||
}
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print '<table class="centpercent nobordernopadding"><tr>';
|
||||
print '<td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllCustomerTemplateInvoices").'</span><span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -1383,12 +1390,12 @@ if ($object->id > 0) {
|
||||
print '<td class="right"><b>!!!</b></td>';
|
||||
}
|
||||
}
|
||||
print '<td class="right" style="min-width: 60px">';
|
||||
print '<td class="right nowraponall">';
|
||||
print price($objp->total_ht);
|
||||
print '</td>';
|
||||
|
||||
if (getDolGlobalString('MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES')) {
|
||||
print '<td class="right" style="min-width: 60px">';
|
||||
print '<td class="right nowraponall">';
|
||||
print price($objp->total_ttc);
|
||||
print '</td>';
|
||||
}
|
||||
@@ -1440,11 +1447,16 @@ if ($object->id > 0) {
|
||||
if ($num > 0) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent lastrecordtable">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="5"><table class="centpercent nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllBills").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
$colspan = 5;
|
||||
if (getDolGlobalString('MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES')) {
|
||||
$colspan++;
|
||||
}
|
||||
print '<td colspan="'.$colspan.'">';
|
||||
print '<table class="centpercent nobordernopadding"><tr><td>'.$langs->trans("LastCustomersBills", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'"><span class="hideonsmartphone">'.$langs->trans("AllBills").'</span><span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td width="20px" class="right"><a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$object->id.'">'.img_picto($langs->trans("Statistics"), 'stats').'</a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr></table>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@@ -1462,6 +1474,7 @@ if ($object->id > 0) {
|
||||
$facturestatic->status = $objp->status;
|
||||
$facturestatic->paye = $objp->paye;
|
||||
$facturestatic->alreadypaid = $objp->am;
|
||||
$facturestatic->totalpaid = $objp->am;
|
||||
$facturestatic->date = $db->jdate($objp->df);
|
||||
$facturestatic->date_lim_reglement = $db->jdate($objp->dl);
|
||||
|
||||
@@ -1508,12 +1521,12 @@ if ($object->id > 0) {
|
||||
} else {
|
||||
print '<td><b>!!!</b></td>';
|
||||
}
|
||||
print '<td class="right" style="min-width: 60px">';
|
||||
print '<td class="right nowraponall">';
|
||||
print price($objp->total_ht);
|
||||
print '</td>';
|
||||
|
||||
if (getDolGlobalString('MAIN_SHOW_PRICE_WITH_TAX_IN_SUMMARIES')) {
|
||||
print '<td class="right" style="min-width: 60px">';
|
||||
print '<td class="right nowraponall">';
|
||||
print price($objp->total_ttc);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@ if (empty($action) && empty($object->id)) {
|
||||
$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@@ -998,9 +997,9 @@ if ($action == 'create') {
|
||||
$nbemail = ($object->nbemail ? $object->nbemail : 0);
|
||||
if (is_numeric($nbemail)) {
|
||||
$text = '';
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
|
||||
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
|
||||
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
|
||||
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalInt('MAILING_LIMIT_SENDBYWEB'));
|
||||
} else {
|
||||
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
|
||||
}
|
||||
@@ -1029,7 +1028,9 @@ if ($action == 'create') {
|
||||
print $text;
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'mail') {
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING').')</span>';
|
||||
print ' <span class="opacitymedium">(';
|
||||
print getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING', getDolGlobalString('MAIN_MAIL_SMTP_SERVER'));
|
||||
print ')</span>';
|
||||
}
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_SENDMODE') != 'mail' && getDolGlobalString('MAIN_MAIL_SMTP_SERVER')) {
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER').')</span>';
|
||||
|
||||
@@ -58,28 +58,31 @@ print load_fiche_titre($title);
|
||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
$titlesearch = $langs->trans("SearchAMailing");
|
||||
if (getDolGlobalInt('EMAILINGS_SUPPORT_ALSO_SMS')) {
|
||||
$titlesearch .= ' | '.$langs->trans("smsing");
|
||||
}
|
||||
|
||||
// Search into emailings
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$titlesearch.'</td></tr>';
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $langs->trans("Ref").':</td><td><input type="text" class="flat inputsearch" name="sref"></td>';
|
||||
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $langs->trans("Other").':</td><td><input type="text" class="flat inputsearch" name="sall"></td>';
|
||||
|
||||
print "</table></div></form><br>\n";
|
||||
|
||||
//if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
|
||||
//{
|
||||
// Search into emailings
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAMailing").'</td></tr>';
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $langs->trans("Ref").':</td><td><input type="text" class="flat inputsearch" name="sref"></td>';
|
||||
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $langs->trans("Other").':</td><td><input type="text" class="flat inputsearch" name="sall"></td>';
|
||||
|
||||
print "</table></div></form><br>\n";
|
||||
//}
|
||||
|
||||
|
||||
// Affiche stats de tous les modules de destinataires mailings
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("TargetsStatistics").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("TargetsStatistics").'</td></tr>';
|
||||
|
||||
$dir = DOL_DOCUMENT_ROOT."/core/modules/mailings";
|
||||
$handle = opendir($dir);
|
||||
@@ -101,14 +104,14 @@ if (is_resource($handle)) {
|
||||
|
||||
$qualified = 1;
|
||||
foreach ($mailmodule->require_module as $key) {
|
||||
if (empty($conf->$key->enabled) || (!$user->admin && $mailmodule->require_admin)) {
|
||||
if (!isModEnabled($key) || (!$user->admin && !empty($mailmodule->require_admin))) {
|
||||
$qualified = 0;
|
||||
//print "Les pr<70>requis d'activation du module mailing ne sont pas respect<63>s. Il ne sera pas actif";
|
||||
//print "Prerequisites are not not, selector won't be active";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Si le module mailing est qualifi<EFBFBD>
|
||||
// If emailing is qualified for statistic section
|
||||
if ($qualified) {
|
||||
foreach ($mailmodule->getSqlArrayForStats() as $sql) {
|
||||
print '<tr class="oddeven">';
|
||||
@@ -118,10 +121,10 @@ if (is_resource($handle)) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($result);
|
||||
print '<td>'.img_object('', $mailmodule->picto).' '.$obj->label.'</td><td class="right">'.$obj->nb.'<td>';
|
||||
print '<td>'.img_object('', $mailmodule->picto).' '.dol_escape_htmltag($obj->label).'</td>';
|
||||
print '<td class="right">'.$obj->nb.'</td>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -149,7 +152,7 @@ print '</div><div class="fichetwothirdright">';
|
||||
* List of last emailings
|
||||
*/
|
||||
$limit = 10;
|
||||
$sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat";
|
||||
$sql = "SELECT m.rowid, m.titre as title, m.nbemail, m.statut as status, m.date_creat";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mailing as m";
|
||||
$sql .= " WHERE m.entity = ".$conf->entity;
|
||||
$sql .= " ORDER BY m.date_creat DESC";
|
||||
@@ -179,7 +182,7 @@ if ($result) {
|
||||
print '<td>'.(!empty($obj->title) ? dol_trunc($obj->title, 38) : '').'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->date_creat), 'day').'</td>';
|
||||
print '<td class="center">'.($obj->nbemail ? $obj->nbemail : "0").'</td>';
|
||||
print '<td class="right">'.$mailstatic->LibStatut($obj->statut, 5).'</td>';
|
||||
print '<td class="right">'.$mailstatic->LibStatut($obj->status, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/emailing.lib.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mailing", "companies"));
|
||||
$langs->loadLangs(array("mails", "mailing", "companies"));
|
||||
|
||||
// Get parameters
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2017 Pierre-Henry Favre <support@atm-consulting.fr>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2022-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -734,18 +734,18 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
print_liste_field_titre($arrayfields['date']['label'], $_SERVER["PHP_SELF"], "date", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
print_liste_field_titre($arrayfields['date_due']['label'], $_SERVER["PHP_SELF"], "date_due", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||
print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
|
||||
print '<td>'.$langs->trans("Document").'</td>';
|
||||
print '<td>'.$langs->trans("Paid").'</td>';
|
||||
print '<td align="right">'.$langs->trans("TotalHT").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</td>';
|
||||
print '<td align="right">'.$langs->trans("TotalTTC").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</td>';
|
||||
print '<td align="right">'.$langs->trans("TotalVAT").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</td>';
|
||||
print '<th>'.$langs->trans("Document").'</th>';
|
||||
print '<th>'.$langs->trans("Paid").'</th>';
|
||||
print '<th class="right">'.$langs->trans("TotalHT").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</th>';
|
||||
print '<th class="right">'.$langs->trans("TotalTTC").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</th>';
|
||||
print '<th class="right">'.$langs->trans("TotalVAT").(isModEnabled('multicurrency') ? ' ('.$langs->getCurrencySymbol($conf->currency).')' : '').'</th>';
|
||||
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Code").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Country").'</td>';
|
||||
print '<td class="center">'.$langs->trans("VATIntra").'</td>';
|
||||
print '<th>'.$langs->trans("ThirdParty").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Code").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Country").'</th>';
|
||||
print '<th class="center">'.$langs->trans("VATIntra").'</th>';
|
||||
if (isModEnabled('multicurrency')) {
|
||||
print '<td class="center">'.$langs->trans("Currency").'</td>';
|
||||
print '<th class="center">'.$langs->trans("Currency").'</th>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
@@ -862,9 +862,9 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
print '<td class="center">'.($data['paid'] ? yn($data['paid']) : '').'</td>';
|
||||
|
||||
// Total WOT
|
||||
print '<td align="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))."</span></td>\n";
|
||||
print '<td class="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'], 'MT'))."</span></td>\n";
|
||||
// Total INCT
|
||||
print '<td align="right"><span class="amount">';
|
||||
print '<td class="right"><span class="amount">';
|
||||
$tooltip = $langs->trans("TotalVAT").' : '.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'));
|
||||
if (!empty($data['amount_localtax1'])) {
|
||||
$tooltip .= '<br>'.$langs->transcountrynoentities("TotalLT1", $mysoc->country_code).' : '.price(price2num($data['sens'] ? $data['amount_localtax1'] : -$data['amount_localtax1'], 'MT'));
|
||||
@@ -878,7 +878,7 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
print '<span class="classfortooltip" title="'.dol_escape_htmltag($tooltip).'">'.price(price2num($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'], 'MT')).'</span>';
|
||||
print "</span></td>\n";
|
||||
// Total VAT
|
||||
print '<td align="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))."</span></td>\n";
|
||||
print '<td class="right"><span class="amount">'.price(price2num($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'], 'MT'))."</span></td>\n";
|
||||
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($data['thirdparty_name']).'">'.dol_escape_htmltag($data['thirdparty_name'])."</td>\n";
|
||||
|
||||
@@ -909,9 +909,9 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
// Total credits
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="6" class="right">'.$langs->trans('Total').' '.$langs->trans('Income').'</td>';
|
||||
print '<td align="right">'.price(price2num($totalET_credit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalIT_credit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalVAT_credit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalET_credit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalIT_credit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalVAT_credit, 'MT')).'</td>';
|
||||
print '<td colspan="4"></td>';
|
||||
if (isModEnabled('multicurrency')) {
|
||||
print '<td></td>';
|
||||
@@ -920,9 +920,9 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
// Total debits
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="6" class="right">'.$langs->trans('Total').' '.$langs->trans('Outcome').'</td>';
|
||||
print '<td align="right">'.price(price2num($totalET_debit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalIT_debit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalVAT_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalET_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalIT_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalVAT_debit, 'MT')).'</td>';
|
||||
print '<td colspan="4"></td>';
|
||||
if (isModEnabled('multicurrency')) {
|
||||
print '<td></td>';
|
||||
@@ -931,9 +931,9 @@ if (!empty($date_start) && !empty($date_stop)) {
|
||||
// Balance
|
||||
print '<tr class="liste_total">';
|
||||
print '<td colspan="6" class="right">'.$langs->trans('Total').'</td>';
|
||||
print '<td align="right">'.price(price2num($totalET_credit + $totalET_debit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).'</td>';
|
||||
print '<td align="right">'.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalET_credit + $totalET_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).'</td>';
|
||||
print '<td class="right">'.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).'</td>';
|
||||
print '<td colspan="4"></td>';
|
||||
if (isModEnabled('multicurrency')) {
|
||||
print '<td></td>';
|
||||
|
||||
@@ -2343,8 +2343,6 @@ class Facture extends CommonInvoice
|
||||
$line->fk_product = $objp->fk_product;
|
||||
$line->date_start = $this->db->jdate($objp->date_start);
|
||||
$line->date_end = $this->db->jdate($objp->date_end);
|
||||
$line->date_start = $this->db->jdate($objp->date_start);
|
||||
$line->date_end = $this->db->jdate($objp->date_end);
|
||||
$line->info_bits = $objp->info_bits;
|
||||
$line->total_ht = $objp->total_ht;
|
||||
$line->total_tva = $objp->total_tva;
|
||||
|
||||
@@ -59,8 +59,8 @@ $action = (GETPOST('action', 'alpha') ? GETPOST('action', 'alpha') : 'view');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$id = GETPOST('id', 'int');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
$id = GETPOSTINT('id');
|
||||
$socid = GETPOSTINT('socid');
|
||||
|
||||
// Initialize technical object
|
||||
$object = new Contact($db);
|
||||
@@ -102,7 +102,7 @@ $permissiontoadd = $user->hasRight('societe', 'contact', 'creer');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
if ($object->priv && $object->user_creation->id != $user->id) {
|
||||
if ($object->priv && $object->user_creation_id != $user->id) {
|
||||
accessforbidden();
|
||||
}
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
|
||||
@@ -206,7 +206,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
$object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
|
||||
$object->socid = GETPOSTINT("socid");
|
||||
$object->socid = $socid;
|
||||
$object->lastname = (string) GETPOST("lastname", 'alpha');
|
||||
$object->firstname = (string) GETPOST("firstname", 'alpha');
|
||||
$object->civility_code = (string) GETPOST("civility_code", 'alpha');
|
||||
@@ -404,7 +404,7 @@ if (empty($reshook)) {
|
||||
|
||||
$object->oldcopy = clone $object;
|
||||
|
||||
$object->socid = GETPOST("socid", 'int');
|
||||
$object->socid = $socid;
|
||||
$object->lastname = (string) GETPOST("lastname", 'alpha');
|
||||
$object->firstname = (string) GETPOST("firstname", 'alpha');
|
||||
$object->civility_code = (string) GETPOST("civility_code", 'alpha');
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2023-2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -62,7 +62,6 @@ if (!$sortorder) {
|
||||
$sortorder = "ASC";
|
||||
}
|
||||
|
||||
$filter = GETPOST("filter", 'alpha');
|
||||
$search_name = GETPOST("search_name", 'alpha');
|
||||
$search_subprice = GETPOST("search_subprice", 'alpha');
|
||||
$search_qty = GETPOST("search_qty", 'alpha');
|
||||
@@ -114,20 +113,6 @@ if (!empty($user->socid)) {
|
||||
}
|
||||
$result = restrictedArea($user, 'contrat', $contratid);
|
||||
|
||||
if ($search_status != '') {
|
||||
$tmp = explode('&', $search_status);
|
||||
if (!empty($tmp[1])) {
|
||||
if ($tmp[1] == 'filter=notexpired') {
|
||||
$search_status = $tmp[0];
|
||||
$filter = 'notexpired';
|
||||
}
|
||||
if ($tmp[1] == 'filter=expired') {
|
||||
$search_status = $tmp[0];
|
||||
$filter = 'expired';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$staticcontrat = new Contrat($db);
|
||||
$staticcontratligne = new ContratLigne($db);
|
||||
$companystatic = new Societe($db);
|
||||
@@ -194,7 +179,7 @@ if (empty($reshook)) {
|
||||
$search_total_ttc = "";
|
||||
$search_contract = "";
|
||||
$search_service = "";
|
||||
$search_status = -1;
|
||||
$search_status = "";
|
||||
$opouvertureprevuemonth = "";
|
||||
$opouvertureprevueday = "";
|
||||
$opouvertureprevueyear = "";
|
||||
@@ -211,7 +196,6 @@ if (empty($reshook)) {
|
||||
$opclotureday = "";
|
||||
$opclotureyear = "";
|
||||
$filter_opcloture = "";
|
||||
$filter = '';
|
||||
$toselect = array();
|
||||
$search_array_options = array();
|
||||
}
|
||||
@@ -299,15 +283,15 @@ if ($search_status == "0") {
|
||||
if ($search_status == "4") {
|
||||
$sql .= " AND cd.statut = 4";
|
||||
}
|
||||
if ($search_status == "4&filter=expired") {
|
||||
$sql .= " AND cd.statut = 4 AND cd.date_fin_validite < '".$db->idate($now)."'";
|
||||
}
|
||||
if ($search_status == "4&filter=notexpired") {
|
||||
$sql .= " AND cd.statut = 4 AND cd.date_fin_validite >= '".$db->idate($now)."'";
|
||||
}
|
||||
if ($search_status == "5") {
|
||||
$sql .= " AND cd.statut = 5";
|
||||
}
|
||||
if ($filter == "expired") {
|
||||
$sql .= " AND cd.date_fin_validite < '".$db->idate($now)."'";
|
||||
}
|
||||
if ($filter == "notexpired") {
|
||||
$sql .= " AND cd.date_fin_validite >= '".$db->idate($now)."'";
|
||||
}
|
||||
if ($search_subprice) {
|
||||
$sql .= natural_search("cd.subprice", $search_subprice, 1);
|
||||
}
|
||||
@@ -478,9 +462,6 @@ if ($search_service) {
|
||||
if ($search_status) {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
if ($filter) {
|
||||
$param .= '&filter='.urlencode($filter);
|
||||
}
|
||||
if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1) {
|
||||
$param .= '&filter_opouvertureprevue='.urlencode($filter_opouvertureprevue);
|
||||
}
|
||||
@@ -594,7 +575,6 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
}
|
||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="hidden" name="filter" value="'.$filter.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" class="flat maxwidth75" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
|
||||
print '</td>';
|
||||
|
||||
@@ -882,8 +882,9 @@ class CMailFile
|
||||
if ($res) {
|
||||
$additionnalparam = ''; // By default
|
||||
if (getDolGlobalString('MAIN_MAIL_ALLOW_SENDMAIL_F')) {
|
||||
// le "Return-Path" (retour des messages bounced) dans les header ne fonctionne pas avec tous les MTA
|
||||
// Le forcage de la valeur grace à l'option -f de sendmail est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie.
|
||||
// When using the phpmail function, the mail command may force the from to the user of the login, for example: linuxuser@myserver.mydomain.com
|
||||
// You can try to set this option to have the command use the From. if it does not work, you can also try the MAIN_MAIL_SENDMAIL_FORCE_BA.
|
||||
// So forcing using the option -f of sendmail is possible if constant MAIN_MAIL_ALLOW_SENDMAIL_F is defined.
|
||||
// Having this variable defined may create problems with some sendmail (option -f refused)
|
||||
// Having this variable not defined may create problems with some other sendmail (option -f required)
|
||||
$additionnalparam .= ($additionnalparam ? ' ' : '').(getDolGlobalString('MAIN_MAIL_ERRORS_TO') ? '-f'.$this->getValidAddress($conf->global->MAIN_MAIL_ERRORS_TO, 2) : ($this->addr_from != '' ? '-f'.$this->getValidAddress($this->addr_from, 2) : ''));
|
||||
|
||||
@@ -5610,6 +5610,7 @@ abstract class CommonObject
|
||||
|
||||
// If selected model is a filename template (then $modele="modelname" or "modelname:filename")
|
||||
$tmp = explode(':', $modele, 2);
|
||||
$saved_model = $modele;
|
||||
if (!empty($tmp[1])) {
|
||||
$modele = $tmp[0];
|
||||
$srctemplatepath = $tmp[1];
|
||||
@@ -5717,7 +5718,7 @@ abstract class CommonObject
|
||||
$sav_charset_output = empty($outputlangs->charset_output) ? '' : $outputlangs->charset_output;
|
||||
|
||||
// update model_pdf in object
|
||||
$this->model_pdf = $modele;
|
||||
$this->model_pdf = $saved_model;
|
||||
|
||||
if (in_array(get_class($this), array('Adherent'))) {
|
||||
$resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, 'tmp_cards', $moreparams);
|
||||
@@ -9526,7 +9527,7 @@ abstract class CommonObject
|
||||
$this->$field = (float) $obj->$field;
|
||||
}
|
||||
} else {
|
||||
if (isset($obj->$field) && !is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1)) {
|
||||
if (isset($obj->$field) && (!is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1))) {
|
||||
$this->$field = (int) $obj->$field;
|
||||
} else {
|
||||
$this->$field = null;
|
||||
@@ -9541,7 +9542,7 @@ abstract class CommonObject
|
||||
$this->$field = (float) $obj->$field;
|
||||
}
|
||||
} else {
|
||||
if (isset($obj->$field) && !is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1)) {
|
||||
if (isset($obj->$field) && (!is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1))) {
|
||||
$this->$field = (float) $obj->$field;
|
||||
} else {
|
||||
$this->$field = null;
|
||||
|
||||
@@ -732,7 +732,7 @@ class Conf extends stdClass
|
||||
}
|
||||
|
||||
if (!isset($this->global->MAIN_ENABLE_AJAX_TOOLTIP)) {
|
||||
$this->global->MAIN_ENABLE_AJAX_TOOLTIP = 1;
|
||||
$this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip)
|
||||
}
|
||||
|
||||
// By default, suppliers objects can be linked to all projects
|
||||
|
||||
@@ -103,14 +103,14 @@ class CUnits extends CommonDict
|
||||
$sql .= "code,";
|
||||
$sql .= "label,";
|
||||
$sql .= "short_label,";
|
||||
$sql .= "unit_type";
|
||||
$sql .= "unit_type,";
|
||||
$sql .= "scale";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= " ".(!isset($this->id) ? 'NULL' : "'".$this->db->escape($this->id)."'").",";
|
||||
$sql .= " ".(!isset($this->code) ? 'NULL' : "'".$this->db->escape($this->code)."'").",";
|
||||
$sql .= " ".(!isset($this->label) ? 'NULL' : "'".$this->db->escape($this->label)."'").",";
|
||||
$sql .= " ".(!isset($this->short_label) ? 'NULL' : "'".$this->db->escape($this->short_label)."'").",";
|
||||
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'");
|
||||
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'").",";
|
||||
$sql .= " ".(!isset($this->scale) ? 'NULL' : "'".$this->db->escape($this->scale)."'");
|
||||
$sql .= ")";
|
||||
|
||||
|
||||
@@ -1120,11 +1120,12 @@ class ExtraFields
|
||||
} else {
|
||||
$checked = ' value="1" ';
|
||||
}
|
||||
$out = '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1.
|
||||
$out .= '<input type="checkbox" class="flat valignmiddle'.($morecss ? ' '.$morecss : '').' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.$checked.' '.($moreparam ? $moreparam : '').'>';
|
||||
|
||||
$out = '<input type="checkbox" class="flat valignmiddle'.($morecss ? ' '.$morecss : '').' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" '.$checked.' '.($moreparam ? $moreparam : '').'>';
|
||||
} else {
|
||||
$out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1);
|
||||
}
|
||||
$out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1.
|
||||
} elseif ($type == 'price') {
|
||||
if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format.
|
||||
$value = price($value);
|
||||
|
||||
@@ -1862,6 +1862,9 @@ class FormMail extends Form
|
||||
$tmparray['__OTHER3__'] = 'Other3';
|
||||
$tmparray['__OTHER4__'] = 'Other4';
|
||||
$tmparray['__OTHER5__'] = 'Other5';
|
||||
$tmparray['__CHECK_READ__'] = $langs->trans('TagCheckMail');
|
||||
$tmparray['__UNSUBSCRIBE__'] = $langs->trans('TagUnsubscribe');
|
||||
$tmparray['__UNSUBSCRIBE_URL__'] = $langs->trans('TagUnsubscribe').' (URL)';
|
||||
|
||||
$onlinepaymentenabled = 0;
|
||||
if (isModEnabled('paypal')) {
|
||||
@@ -1919,7 +1922,7 @@ class FormMail extends Form
|
||||
*/
|
||||
}
|
||||
if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
|
||||
$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = 'BlankSubscriptionForm';
|
||||
$tmparray['__PUBLICLINK_NEWMEMBERFORM__'] = 'BlankSubscriptionForm';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -338,6 +338,9 @@ class Utils
|
||||
if (GETPOST("use_mysql_quick_param", "alpha")) {
|
||||
$param .= " --quick";
|
||||
}
|
||||
if (GETPOST("use_force", "alpha")) {
|
||||
$param .= " -f";
|
||||
}
|
||||
if (GETPOST("sql_structure", "alpha") || $usedefault) {
|
||||
if (GETPOST("drop", "alpha") || $usedefault) {
|
||||
$param .= " --add-drop-table=TRUE";
|
||||
|
||||
@@ -191,7 +191,7 @@ interface Database
|
||||
|
||||
/**
|
||||
* Escape a string to insert data into a like.
|
||||
* Can be used this way: LIKE '%".dbhandler->escapeforlike(dbhandler->escape(...))."%'
|
||||
* Can be used this way: LIKE '%".dbhandler->escape(dbhandler->escapeforlike(...))."%'
|
||||
*
|
||||
* @param string $stringtoencode String to escape
|
||||
* @return string String escaped
|
||||
|
||||
@@ -8718,7 +8718,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$daytext = $outputlangs->trans('Day'.$tmp['wday']);
|
||||
|
||||
$substitutionarray = array_merge($substitutionarray, array(
|
||||
'__NOW_TMS__' => (int) $now,
|
||||
'__NOW_TMS__' => (string) $now, // Must be the string that represent the int
|
||||
'__NOW_TMS_YMD__' => dol_print_date($now, 'day', 'auto', $outputlangs),
|
||||
'__DAY__' => (string) $tmp['mday'],
|
||||
'__DAY_TEXT__' => $daytext, // Monday
|
||||
@@ -12658,7 +12658,7 @@ function dolForgeCriteriaCallback($matches)
|
||||
if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) {
|
||||
$tmpescaped = $regbis[1];
|
||||
}
|
||||
//$tmpescaped = "'".$db->escapeforlike($db->escape($regbis[1]))."'";
|
||||
//$tmpescaped = "'".$db->escape($db->escapeforlike($regbis[1]))."'";
|
||||
$tmpescaped = "'".$db->escape($tmpescaped)."'"; // We do not escape the _ and % so the like will works
|
||||
} elseif (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) {
|
||||
$tmpescaped = "'".$db->escape($regbis[1])."'";
|
||||
|
||||
@@ -192,7 +192,7 @@ function dol_print_object_info($object, $usetable = 0)
|
||||
} else {
|
||||
print ': ';
|
||||
}
|
||||
if (is_object($object->user_creation)) {
|
||||
if (! empty($object->user_creation) && is_object($object->user_creation)) { // deprecated mode
|
||||
if ($object->user_creation->id) {
|
||||
print $object->user_creation->getNomUrl(-1, '', 0, 0, 0);
|
||||
} else {
|
||||
|
||||
@@ -201,6 +201,7 @@ foreach (array('internal', 'external') as $source) {
|
||||
$entry->type = $contact['libelle'];
|
||||
$entry->nature = "";
|
||||
$entry->nature_html = "";
|
||||
$entry->thirdparty_id = 0;
|
||||
$entry->thirdparty_html = "";
|
||||
$entry->thirdparty_name = "";
|
||||
$entry->contact_html = "";
|
||||
|
||||
@@ -137,7 +137,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
||||
|
||||
// For merge event, we add a mention
|
||||
if (!empty($object->context['mergefromname'])) {
|
||||
$object->actionmsg = dol_concatdesc($object->actionmsg, $langs->trans("DataFromWasMerged", $object->context['mergefromname']));
|
||||
$object->actionmsg = dol_concatdesc($object->actionmsg, $langs->trans("DataFromWasMerged", $object->context['mergefromname'].' (id='.$object->context['mergefromname'].')'));
|
||||
}
|
||||
|
||||
$object->sendtoid = 0;
|
||||
|
||||
@@ -2144,7 +2144,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->line->total_localtax2 = $total_localtax2;
|
||||
$this->line->total_ttc = $total_ttc;
|
||||
$this->line->product_type = $type;
|
||||
$this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0);
|
||||
$this->line->special_code = (!empty($special_code) ? $special_code : 0);
|
||||
$this->line->origin = $origin;
|
||||
$this->line->origin_id = $origin_id;
|
||||
$this->line->fk_unit = $fk_unit;
|
||||
|
||||
@@ -2439,3 +2439,5 @@ RecommendedForProduction=Recommended for Production
|
||||
RecommendedForDebug=Recommended for Debug
|
||||
UrlPublicInterfaceLabelAdmin=Alternative URL for public interface
|
||||
UrlPublicInterfaceHelpAdmin=It is possible to define an alias to the web server and thus make available the public interface with another URL (the virtual host server must act as a proxy on the standard URL)
|
||||
ExportUseForce=Use the parameter -f
|
||||
ExportUseForceHelp=Force to continue the export even when an error is found (Backup may not be reliable)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Mailing=EMailing
|
||||
EMailing=EMailing
|
||||
EMailings=EMailings
|
||||
SMSings=SMSings
|
||||
AllEMailings=All eMailings
|
||||
MailCard=EMailing card
|
||||
MailRecipients=Recipients
|
||||
@@ -24,6 +25,7 @@ BodyNotIn=Not in Body
|
||||
ShowEMailing=Show emailing
|
||||
ListOfEMailings=List of emailings
|
||||
NewMailing=New emailing
|
||||
NewSMSing=New smsing
|
||||
EditMailing=Edit emailing
|
||||
ResetMailing=Resend emailing
|
||||
DeleteMailing=Delete emailing
|
||||
|
||||
@@ -510,7 +510,7 @@ class Loan extends CommonObject
|
||||
$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
}
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Enabled');
|
||||
$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid');
|
||||
$this->labelStatusShort[self::STATUS_STARTED] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
if ($status == 0 && $alreadypaid > 0) {
|
||||
$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
|
||||
|
||||
@@ -502,7 +502,7 @@ class MyObject extends CommonObject
|
||||
if (strpos($value, '%') === false) {
|
||||
$sqlwhere[] = $key . " = '" . $this->db->sanitize($this->db->escape($value)) . "'";
|
||||
} else {
|
||||
$sqlwhere[] = $key . " LIKE '%" . $this->db->escapeforlike($this->db->escape($value)) . "%'";
|
||||
$sqlwhere[] = $key . " LIKE '%" . $this->db->escape($this->db->escapeforlike($value)) . "%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -617,8 +617,8 @@ class MyObject extends CommonObject
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule','write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && !empty($user->rights->mymodule->myobject->myobject_advance->validate))))
|
||||
/* if (! ((!getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule', 'myobject', 'write'))
|
||||
|| (getDolGlobalInt('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('mymodule', 'myobject_advance', 'validate')))
|
||||
{
|
||||
$this->error='NotEnoughPermissions';
|
||||
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
|
||||
|
||||
@@ -177,8 +177,8 @@ class modMyModule extends DolibarrModules
|
||||
// Array to add new pages in new tabs
|
||||
$this->tabs = array();
|
||||
// Example:
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@mymodule:$user->hasRight('mymodule', 'read'):/mymodule/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->hasRight('othermodule', 'read'):/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||
// $this->tabs[] = array('data'=>'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
|
||||
//
|
||||
// Where objecttype can be
|
||||
@@ -290,7 +290,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->rights[$r][0] = $this->numero . sprintf("%02d", ($o * 10) + 3); // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Delete objects of MyModule'; // Permission label
|
||||
$this->rights[$r][4] = 'myobject';
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->mymodule->myobject->delete)
|
||||
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->hasRight('mymodule', 'myobject', 'delete'))
|
||||
$r++;
|
||||
*/
|
||||
/* END MODULEBUILDER PERMISSIONS */
|
||||
|
||||
@@ -111,19 +111,16 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
/* BEGIN MODULEBUILDER DRAFT MYOBJECT
|
||||
// Draft MyObject
|
||||
if (isModEnabled('mymodule') && $user->rights->mymodule->read)
|
||||
{
|
||||
if (isModEnabled('mymodule') && $user->hasRight('mymodule', 'read')) {
|
||||
$langs->load("orders");
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql.= ", s.code_client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE c.fk_soc = s.rowid";
|
||||
$sql.= " AND c.fk_statut = 0";
|
||||
$sql.= " AND c.entity IN (".getEntity('commande').")";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
if ($socid) $sql.= " AND c.fk_soc = ".((int) $socid);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
@@ -192,13 +189,10 @@ $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT');
|
||||
|
||||
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
|
||||
// Last modified myobject
|
||||
if (isModEnabled('mymodule') && $user->rights->mymodule->read)
|
||||
{
|
||||
if (isModEnabled('mymodule') && $user->hasRight('mymodule', 'read')) {
|
||||
$sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mymodule_myobject as s";
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.entity IN (".getEntity($myobjectstatic->element).")";
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
//if ($socid) $sql.= " AND s.rowid = $socid";
|
||||
$sql .= " ORDER BY s.tms DESC";
|
||||
$sql .= $db->plimit($max, 0);
|
||||
|
||||
@@ -136,8 +136,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||
$enablepermissioncheck = 0;
|
||||
if ($enablepermissioncheck) {
|
||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissiontoread = $user->hasRight('mymodule', 'myobject', 'read');
|
||||
$permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write');
|
||||
} else {
|
||||
$permissiontoread = 1;
|
||||
$permissiontoadd = 1;
|
||||
|
||||
@@ -83,8 +83,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
|
||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||
$enablepermissioncheck = 0;
|
||||
if ($enablepermissioncheck) {
|
||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissiontoread = $user->hasRight('mymodule', 'myobject', 'read');
|
||||
$permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write');
|
||||
} else {
|
||||
$permissiontoread = 1;
|
||||
$permissiontoadd = 1;
|
||||
|
||||
@@ -130,8 +130,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||
$enablepermissioncheck = 0;
|
||||
if ($enablepermissioncheck) {
|
||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||
$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
$permissiontoread = $user->hasRight('mymodule', 'myobject', 'read');
|
||||
$permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles.inc.php
|
||||
} else {
|
||||
$permissiontoread = 1;
|
||||
$permissiontoadd = 1;
|
||||
@@ -251,12 +251,7 @@ print '</div>';
|
||||
print dol_get_fiche_end();
|
||||
|
||||
$modulepart = 'mymodule';
|
||||
//$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissiontoadd = 1;
|
||||
//$permtoedit = $user->rights->mymodule->myobject->write;
|
||||
$permtoedit = 1;
|
||||
$param = '&id='.$object->id;
|
||||
|
||||
//$relativepathwithnofile='myobject/' . dol_sanitizeFileName($object->id).'/';
|
||||
$relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/';
|
||||
|
||||
|
||||
@@ -108,9 +108,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||
$enablepermissioncheck = 0;
|
||||
if ($enablepermissioncheck) {
|
||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissionnote = $user->rights->mymodule->myobject->write; // Used by the include of actions_setnotes.inc.php
|
||||
$permissiontoread = $user->hasRight('mymodule', 'myobject', 'read');
|
||||
$permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write');
|
||||
$permissionnote = $user->hasRight('mymodule', 'myobject', 'write'); // Used by the include of actions_setnotes.inc.php
|
||||
} else {
|
||||
$permissiontoread = 1;
|
||||
$permissiontoadd = 1;
|
||||
|
||||
@@ -432,9 +432,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if ($object->status == $object::STATUS_DRAFT || $object->status == $object::STATUS_CANCELED) {
|
||||
if ($permissiontoadd) {
|
||||
if (getDolGlobalInt('INVENTORY_INCLUDE_SUB_WAREHOUSE') && !empty($object->fk_warehouse)) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=validate&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=validate&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("ToStart").')</a>';
|
||||
} else {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("Start").')</a>';
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken().'">'.$langs->trans("Validate").' ('.$langs->trans("ToStart").')</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ if (!$ret) {
|
||||
|
||||
print dol_get_fiche_head($head, 'resources', $langs->trans("Action"), -1, 'action');
|
||||
|
||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||
$linkback .= img_picto($langs->trans("BackToList"), 'object_calendarlist', 'class="pictoactionview pictofixedwidth"');
|
||||
$linkback .= '<span class="hideonsmartphone">'.$langs->trans("BackToList").'</span>';
|
||||
$linkback .= '</a>';
|
||||
|
||||
@@ -5080,10 +5080,11 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* llx_societe_extrafields table must not be here because we don't care about the old thirdparty data
|
||||
* Do not include llx_societe because it will be replaced later
|
||||
* llx_societe_extrafields table must not be here because we don't care about the old thirdparty extrafields that are managed directly into mergeCompany.
|
||||
* Do not include llx_societe because it will be replaced later.
|
||||
*/
|
||||
$tables = array(
|
||||
'societe_account',
|
||||
'societe_commerciaux',
|
||||
'societe_prices',
|
||||
'societe_remise',
|
||||
@@ -5299,6 +5300,8 @@ class Societe extends CommonObject
|
||||
$error = 0;
|
||||
$soc_origin = new Societe($this->db); // The thirdparty that we will delete
|
||||
|
||||
dol_syslog("mergeCompany merge thirdparty id=".$soc_origin_id." (will be deleted) into the thirdparty id=".$this->id);
|
||||
|
||||
if (!$error && $soc_origin->fetch($soc_origin_id) < 1) {
|
||||
$this->error = $langs->trans('ErrorRecordNotFound');
|
||||
$error++;
|
||||
|
||||
@@ -63,8 +63,6 @@ if (GETPOST('action', 'alpha') == 'set') {
|
||||
$db->rollback();
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
} elseif (GETPOST('action', 'alpha') == 'setmethod') {
|
||||
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -126,13 +126,11 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
|
||||
print '<td>'.$langs->trans("Parameters").'</td><td class="">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
//if (getDolGlobalString('TAKEPOS_PRINT_METHOD') != "browser") { // Why this ?
|
||||
print '<tr class="oddeven value"><td>';
|
||||
print $langs->trans("OrderPrinters").' (<a href="'.DOL_URL_ROOT.'/takepos/admin/orderprinters.php?leftmenu=setup">'.$langs->trans("Setup").'</a>)';
|
||||
print '</td>';
|
||||
print '<td class="">';
|
||||
print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0);
|
||||
//print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
if (getDolGlobalString('TAKEPOS_ORDER_PRINTERS')) {
|
||||
@@ -141,7 +139,6 @@ if (getDolGlobalInt('TAKEPOS_BAR_RESTAURANT')) {
|
||||
print '</td>';
|
||||
print '<td class="">';
|
||||
print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0);
|
||||
//print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
/*else {
|
||||
|
||||
@@ -281,7 +281,7 @@ if (isModEnabled("service")) {
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc"));
|
||||
print '<td>';
|
||||
print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0, 0, 'widthcentpercentminusx');
|
||||
print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID'), 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0, 0, 'maxwidth500 widthcentpercentminusx');
|
||||
print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID');
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -361,7 +361,7 @@ if (is_array($formmail->lines_model)) {
|
||||
}
|
||||
//var_dump($arraydefaultmessage);
|
||||
//var_dump($arrayofmessagename);
|
||||
print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE, 'None', 1, 0, '', 0, 0, 0, '', '', 1);
|
||||
print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, getDolGlobalString('TAKEPOS_EMAIL_TEMPLATE_INVOICE'), 'None', 1, 0, '', 0, 0, 0, '', 'maxwidth500 widthcentpercentminusx', 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Control cash box at opening pos
|
||||
|
||||
@@ -96,6 +96,8 @@ if ($conf->browser->layout == 'phone') {
|
||||
$MAXCATEG = (!getDolGlobalString('TAKEPOS_NB_MAXCATEG') ? $maxcategbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXCATEG);
|
||||
$MAXPRODUCT = (!getDolGlobalString('TAKEPOS_NB_MAXPRODUCT') ? $maxproductbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXPRODUCT);
|
||||
|
||||
$term = empty($_SESSION['takeposterminal']) ? 1: $_SESSION['takeposterminal'];
|
||||
|
||||
/*
|
||||
$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"];
|
||||
$soc = new Societe($db);
|
||||
@@ -1340,7 +1342,7 @@ if (getDolGlobalString('TAKEPOS_BAR_RESTAURANT')) {
|
||||
} else {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'TakeposPrinting(placeid);');
|
||||
}
|
||||
} elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
} elseif ((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'DolibarrTakeposPrinting(placeid);');
|
||||
} else {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("Receipt").'</div>', 'action'=>'Print(placeid);');
|
||||
@@ -1357,7 +1359,7 @@ if (getDolGlobalString('TAKEPOS_BAR_RESTAURANT')) {
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
$menus[$r++] = array('title'=>'<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("DOL_OPEN_DRAWER").'</div>', 'action'=>'OpenDrawer();');
|
||||
}
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
if (getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0 || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
$menus[$r++] = array(
|
||||
'title' => '<span class="fa fa-receipt paddingrightonly"></span><div class="trunc">'.$langs->trans("DOL_OPEN_DRAWER").'</div>',
|
||||
'action' => 'DolibarrOpenDrawer();',
|
||||
|
||||
@@ -157,6 +157,8 @@ if (isModEnabled('multicurrency') && !empty($_SESSION["takeposcustomercurrency"]
|
||||
}
|
||||
}
|
||||
|
||||
$term = empty($_SESSION["takeposterminal"]) ? 1 : $_SESSION["takeposterminal"];
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@@ -293,7 +295,7 @@ if (empty($reshook)) {
|
||||
|
||||
if ($pay != "delayed") {
|
||||
$payment->create($user);
|
||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
$res = $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||
if ($res < 0) {
|
||||
$error++;
|
||||
dol_htmloutput_errors($langs->trans('ErrorNoPaymentDefined'), $payment->errors, 1);
|
||||
@@ -926,7 +928,7 @@ if (empty($reshook)) {
|
||||
|
||||
if ($action == "order" && $placeid != 0 && ($user->hasRight('takepos', 'run') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE'))) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
if ((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
|
||||
$printer = new dolReceiptPrinter($db);
|
||||
}
|
||||
@@ -971,7 +973,7 @@ if (empty($reshook)) {
|
||||
$order_receipt_printer1 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
if (((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 1;
|
||||
echo "<script>";
|
||||
@@ -1003,7 +1005,7 @@ if (empty($reshook)) {
|
||||
$order_receipt_printer2 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
if (((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 2;
|
||||
echo "<script>";
|
||||
@@ -1035,7 +1037,7 @@ if (empty($reshook)) {
|
||||
$order_receipt_printer3 .= '</td></tr>';
|
||||
}
|
||||
}
|
||||
if ((getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
if (((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") && $linestoprint > 0) {
|
||||
$invoice->fetch($placeid); //Reload object before send to printer
|
||||
$printer->orderprinter = 3;
|
||||
echo "<script>";
|
||||
@@ -1063,6 +1065,7 @@ if (empty($reshook)) {
|
||||
$sectionwithinvoicelink .= $langs->trans('BillShortStatusValidated');
|
||||
}
|
||||
}
|
||||
|
||||
$sectionwithinvoicelink .= '</span><br>';
|
||||
if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) {
|
||||
$sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>';
|
||||
@@ -1072,7 +1075,7 @@ if (empty($reshook)) {
|
||||
} else {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
|
||||
}
|
||||
} elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
} elseif ((isModEnabled('receiptprinter') && getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$term) > 0) || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
|
||||
} else {
|
||||
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
|
||||
|
||||
@@ -171,6 +171,7 @@ if (!isset($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON) || getDolGlobalString
|
||||
function ValidateReduction()
|
||||
{
|
||||
console.log('ValidateReduction');
|
||||
reductionTotal = jQuery('#reduction_total').val();
|
||||
|
||||
if (reductionTotal.length <= 0) {
|
||||
console.error('Error no reduction');
|
||||
|
||||
Reference in New Issue
Block a user