Merge branch 'develop' into new_evol_time_spent_views
This commit is contained in:
commit
d572a9258c
@ -4,10 +4,13 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 10.0.0 compared to 9.0.0 *****
|
||||
For Users:
|
||||
NEW: Module ticket is available as a stable module
|
||||
NEW: Experimental module "Vendor receptions"
|
||||
NEW: Module Ticket is available as a stable module.
|
||||
NEW: Experimental module "Vendor receptions".
|
||||
NEW: Experimental module "BOM".
|
||||
FIX: Disallow line start date to be after end date
|
||||
|
||||
For Developers:
|
||||
NEW: Module DebugBar is available as a stable module.
|
||||
|
||||
|
||||
WARNING:
|
||||
@ -21,6 +24,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* All methods set_draft() were renamed into setDraft().
|
||||
* Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject.
|
||||
* Method load_measuring_units were renamed into selectMeasuringUnits and select_measuring_units was deprecated.
|
||||
* Hidden option CHANGE_ORDER_CONCAT_DESCRIPTION were renamed into MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION
|
||||
|
||||
|
||||
***** ChangeLog for 9.0.1 compared to 9.0.0 *****
|
||||
|
||||
@ -8,6 +8,15 @@ ALL:
|
||||
Check "@CHANGE"
|
||||
|
||||
|
||||
PrestaShopWebservice:
|
||||
---------------------
|
||||
Replace
|
||||
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
|
||||
With
|
||||
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date');
|
||||
|
||||
|
||||
|
||||
CKEDITOR (4.6.2):
|
||||
-----------------
|
||||
* In ckeditor/ckeditor/contents.css
|
||||
|
||||
@ -247,7 +247,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("Addanaccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
||||
@ -113,11 +113,11 @@ if ($result)
|
||||
|
||||
if (! empty($user->rights->accounting->fiscalyear))
|
||||
{
|
||||
$addbutton = '<a class="butActionNew" href="fiscalyear_card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
$addbutton = '<a class="butActionNew" href="fiscalyear_card.php?action=create"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$addbutton = '<a class="butActionRefused classfortooltip" href="#"><span class="valignmiddle" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
$addbutton = '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("NewFiscalYear") .'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
|
||||
$title = $langs->trans('AccountingPeriods');
|
||||
|
||||
@ -333,7 +333,7 @@ if ($result)
|
||||
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print '<td class="liste_titre"></td>';
|
||||
// Current account
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" size="6" name="search_current_account" value="' . dol_escape_htmltag($search_current_account) . '">';
|
||||
print '<input type="text" class="flat" size="6" name="search_current_account" id="search_current_account" value="' . dol_escape_htmltag($search_current_account) . '">';
|
||||
$listofvals=array('withoutvalidaccount'=>$langs->trans("WithoutValidAccount"), 'withvalidaccount'=>$langs->trans("WithValidAccount"));
|
||||
print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1);
|
||||
print '</td>';
|
||||
@ -481,6 +481,14 @@ if ($result)
|
||||
});
|
||||
|
||||
init_savebutton();
|
||||
|
||||
jQuery("#search_current_account").keyup(function() {
|
||||
if (jQuery("#search_current_account").val() != \'\')
|
||||
{
|
||||
console.log("We set a value of account to search "+jQuery("#search_current_account").val()+", so we disable the other search criteria on account");
|
||||
jQuery("#search_current_account_valid").val(-1);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ $button.= '</a>';
|
||||
|
||||
|
||||
$groupby = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
@ -648,7 +648,7 @@ if ($num > 0)
|
||||
// Document date
|
||||
if (! empty($arrayfields['t.doc_date']['checked']))
|
||||
{
|
||||
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -701,7 +701,7 @@ if ($num > 0)
|
||||
// Lettering code
|
||||
if (! empty($arrayfields['t.lettering_code']['checked']))
|
||||
{
|
||||
print '<td align="center">' . $line->lettering_code . '</td>';
|
||||
print '<td class="center">' . $line->lettering_code . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -711,26 +711,26 @@ if ($num > 0)
|
||||
$accountingjournal = new AccountingJournal($db);
|
||||
$result = $accountingjournal->fetch('', $line->code_journal);
|
||||
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal);
|
||||
print '<td align="center">' . $journaltoshow . '</td>';
|
||||
print '<td class="center">' . $journaltoshow . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Creation operation date
|
||||
if (! empty($arrayfields['t.date_creation']['checked']))
|
||||
{
|
||||
print '<td align="center">' . dol_print_date($line->date_creation, 'dayhour') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($line->date_creation, 'dayhour') . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Modification operation date
|
||||
if (! empty($arrayfields['t.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">' . dol_print_date($line->date_modification, 'dayhour') . '</td>';
|
||||
print '<td class="center">' . dol_print_date($line->date_modification, 'dayhour') . '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Action column
|
||||
print '<td align="center" class="nowraponall">';
|
||||
print '<td class="nowraponall center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -257,7 +257,7 @@ if ($action == 'delbookkeepingyear') {
|
||||
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
|
||||
$viewflat = ' <a class="nohover marginrightonly" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle">' . $langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="./card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewAccountingMvt").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
||||
@ -142,12 +142,12 @@ class AccountancySystem
|
||||
$result = $this->rowid;
|
||||
} else {
|
||||
$result = - 2;
|
||||
$this->error = "AccountancySystem::Create Erreur $result";
|
||||
$this->error = "AccountancySystem::Create Error $result";
|
||||
dol_syslog($this->error, LOG_ERR);
|
||||
}
|
||||
} else {
|
||||
$result = - 1;
|
||||
$this->error = "AccountancySystem::Create Erreur $result";
|
||||
$this->error = "AccountancySystem::Create Error $result";
|
||||
dol_syslog($this->error, LOG_ERR);
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ $helptext.='__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__,
|
||||
|
||||
form_constantes($constantes, 0, $helptext);
|
||||
|
||||
//print '<div align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||
//print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'" name="update"></div>';
|
||||
//print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -151,7 +151,7 @@ if ($object->id > 0)
|
||||
$newcardbutton = '';
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&backtopage=1&origin=member&originid='.$id.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -120,7 +120,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
||||
<td class="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
|
||||
</tr>
|
||||
|
||||
</table><br>
|
||||
|
||||
@ -134,7 +134,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4" align="center">
|
||||
<td colspan="4" class="center">
|
||||
<input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">
|
||||
<input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
|
||||
</td>
|
||||
|
||||
@ -113,7 +113,7 @@ if ($id > 0)
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/adherents/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@ -128,7 +128,7 @@ if ($id > 0)
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$object);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
@ -140,10 +140,10 @@ if ($id > 0)
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$object->getCivilityLabel().' </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Nbre fichiers
|
||||
// Number of Attached Files
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
|
||||
//Total taille
|
||||
//Total Size Of Attached Files
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -162,7 +162,7 @@ if ($conf->use_javascript_ajax)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").'</th></tr>';
|
||||
print '<tr><td align="center" colspan="2">';
|
||||
print '<tr><td class="center" colspan="2">';
|
||||
|
||||
$SommeA=0;
|
||||
$SommeB=0;
|
||||
|
||||
@ -365,7 +365,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMember').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMember').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -441,17 +441,17 @@ if (! empty($arrayfields['d.ref']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['d.civility']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.gender']['checked']))
|
||||
@ -463,17 +463,17 @@ if (! empty($arrayfields['d.gender']['checked']))
|
||||
}
|
||||
if (! empty($arrayfields['d.company']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.morphy']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['t.libelle']['checked']))
|
||||
@ -486,18 +486,18 @@ if (! empty($arrayfields['t.libelle']['checked']))
|
||||
|
||||
if (! empty($arrayfields['d.address']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_address" value="'.$search_address.'"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.zip']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.$search_zip.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.town']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_town" value="'.$search_town.'"></td>';
|
||||
}
|
||||
// State
|
||||
@ -510,38 +510,38 @@ if (! empty($arrayfields['state.nom']['checked']))
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Phone pro
|
||||
if (! empty($arrayfields['d.phone']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.$search_phone.'"></td>';
|
||||
}
|
||||
// Phone perso
|
||||
if (! empty($arrayfields['d.phone_perso']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_phone_perso" value="'.$search_phone_perso.'"></td>';
|
||||
}
|
||||
// Phone mobile
|
||||
if (! empty($arrayfields['d.phone_mobile']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'"></td>';
|
||||
}
|
||||
// Email
|
||||
if (! empty($arrayfields['d.email']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_email" value="'.$search_email.'"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.datefin']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
@ -576,7 +576,7 @@ if (! empty($arrayfields['d.statut']['checked']))
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
print '<td class="liste_titre middle">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -647,7 +647,7 @@ while ($i < min($num, $limit))
|
||||
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
{
|
||||
print '<td align="center">'.$obj->rowid.'</td>';
|
||||
print '<td class="center">'.$obj->rowid.'</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ while ($i < min($num, $limit))
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->country, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -794,7 +794,7 @@ while ($i < min($num, $limit))
|
||||
{
|
||||
if ($datefin)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($datefin, 'day');
|
||||
if ($memberstatic->hasDelay()) {
|
||||
$textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay/60/60/24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay/60/60/24).' '.$langs->trans("days").')';
|
||||
@ -804,7 +804,7 @@ while ($i < min($num, $limit))
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td class="nowrap left">';
|
||||
if ($obj->subscription == 'yes')
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
@ -826,7 +826,7 @@ while ($i < min($num, $limit))
|
||||
// Date creation
|
||||
if (! empty($arrayfields['d.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -834,7 +834,7 @@ while ($i < min($num, $limit))
|
||||
// Date modification
|
||||
if (! empty($arrayfields['d.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -848,7 +848,7 @@ while ($i < min($num, $limit))
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
|
||||
@ -93,7 +93,7 @@ if ($id)
|
||||
|
||||
// Morphy
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||
/*print '<td rowspan="'.$rowspan.'" align="center" valign="middle" width="25%">';
|
||||
/*print '<td rowspan="'.$rowspan.'" class="center" valign="middle" width="25%">';
|
||||
print $form->showphoto('memberphoto',$member);
|
||||
print '</td>';*/
|
||||
print '</tr>';
|
||||
|
||||
@ -121,8 +121,8 @@ print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Nature").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfMembers").'</td>';
|
||||
print '<td align="center">'.$langs->trans("LastMemberDate").'</td>';
|
||||
print '<td align="center">'.$langs->trans("LatestSubscriptionDate").'</td>';
|
||||
print '<td class="center">'.$langs->trans("LastMemberDate").'</td>';
|
||||
print '<td class="center">'.$langs->trans("LatestSubscriptionDate").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (! $foundphy) $data[]=array('label'=>'phy','nb'=>'0','lastdate'=>'', 'lastsubscriptiondate'=>'');
|
||||
@ -133,8 +133,8 @@ foreach ($data as $val)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$memberstatic->getmorphylib($val['label']).'</td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td align="center">'.dol_print_date($val['lastdate'], 'dayhour').'</td>';
|
||||
print '<td align="center">'.dol_print_date($val['lastsubscriptiondate'], 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($val['lastdate'], 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($val['lastsubscriptiondate'], 'dayhour').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -287,7 +287,7 @@ if (count($arrayjs) && $mode == 'memberbycountry')
|
||||
print "</script>\n";
|
||||
|
||||
// print the div tag that will contain the map
|
||||
print '<div align="center" id="'.$mode.'"></div>'."\n";
|
||||
print '<div class="center" id="'.$mode.'"></div>'."\n";
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@ -297,10 +297,10 @@ if ($mode)
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$label.'</td>';
|
||||
if ($label2) print '<td align="center">'.$label2.'</td>';
|
||||
if ($label2) print '<td class="center">'.$label2.'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfMembers").'</td>';
|
||||
print '<td align="center">'.$langs->trans("LastMemberDate").'</td>';
|
||||
print '<td align="center">'.$langs->trans("LatestSubscriptionDate").'</td>';
|
||||
print '<td class="center">'.$langs->trans("LastMemberDate").'</td>';
|
||||
print '<td class="center">'.$langs->trans("LatestSubscriptionDate").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
foreach ($data as $val)
|
||||
@ -308,10 +308,10 @@ if ($mode)
|
||||
$year = $val['year'];
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$val['label'].'</td>';
|
||||
if ($label2) print '<td align="center">'.$val['label2'].'</td>';
|
||||
if ($label2) print '<td class="center">'.$val['label2'].'</td>';
|
||||
print '<td class="right">'.$val['nb'].'</td>';
|
||||
print '<td align="center">'.dol_print_date($val['lastdate'], 'dayhour').'</td>';
|
||||
print '<td align="center">'.dol_print_date($val['lastsubscriptiondate'], 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($val['lastdate'], 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_date($val['lastsubscriptiondate'], 'dayhour').'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("User").'</td><td>';
|
||||
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print '</td></tr>';
|
||||
print '<tr><td align="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '<tr><td class="center" colspan="2"><input type="submit" name="submit" class="button" value="'.$langs->trans("Refresh").'"></td></tr>';
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print '<br><br>';
|
||||
@ -170,7 +170,7 @@ $data = $stats->getAllByYear();
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td class="right">'.$langs->trans("NbOfSubscriptions").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountAverage").'</td>';
|
||||
@ -184,7 +184,7 @@ foreach ($data as $val)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="month.php?year='.$oldyear.'&mode='.$mode.'">';
|
||||
print $oldyear;
|
||||
print '</a>';
|
||||
@ -195,7 +195,7 @@ foreach ($data as $val)
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
//print '<a href="month.php?year='.$year.'">';
|
||||
print $year;
|
||||
//print '</a>';
|
||||
@ -215,7 +215,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
// Show graphs
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td align="center">';
|
||||
print '<table class="border" width="100%"><tr class="pair nohover"><td class="center">';
|
||||
if ($mesg) { print $mesg; }
|
||||
else {
|
||||
print $px1->show();
|
||||
|
||||
@ -692,9 +692,9 @@ if ($rowid > 0)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
print '<td align="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateStart").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateStart").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
@ -713,9 +713,9 @@ if ($rowid > 0)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dateh), 'day')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datef), 'day')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datec), 'dayhour')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->dateh), 'day')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->datef), 'day')."</td>\n";
|
||||
print '<td class="right">'.price($objp->subscription).'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
|
||||
@ -247,7 +247,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->cotisation->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/list.php?status=-1,1"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewSubscription').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -284,7 +284,7 @@ $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfiel
|
||||
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
|
||||
// Line for filters fields
|
||||
@ -299,33 +299,33 @@ if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
// Ref
|
||||
if (! empty($arrayfields['d.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'" size="4"></td>';
|
||||
}
|
||||
|
||||
// Type
|
||||
if (! empty($arrayfields['d.fk_type']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_type" value="'.dol_escape_htmltag($search_type).'" size="7">';
|
||||
print'</td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'" size="7"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'" size="12"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'" size="7"></td>';
|
||||
}
|
||||
|
||||
@ -529,13 +529,13 @@ while ($i < min($num, $limit))
|
||||
// Date start
|
||||
if (! empty($arrayfields['c.dateadh']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Date end
|
||||
if (! empty($arrayfields['c.datef']['checked']))
|
||||
{
|
||||
print '<td align="center">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Price
|
||||
@ -555,7 +555,7 @@ while ($i < min($num, $limit))
|
||||
// Date creation
|
||||
if (! empty($arrayfields['c.datec']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -563,13 +563,13 @@ while ($i < min($num, $limit))
|
||||
// Date modification
|
||||
if (! empty($arrayfields['c.tms']['checked']))
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
$selected=0;
|
||||
|
||||
@ -44,8 +44,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
||||
<tr class="oddeven" >
|
||||
<td><?php echo $langs->trans("Subscription"); ?></td>
|
||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td align="center"></td>
|
||||
<td align="center"><?php echo dol_print_date($objectlink->dateh, 'day'); ?></td>
|
||||
<td class="center"></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->dateh, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
if ($user->rights->adherent->lire) {
|
||||
$total = $total + $objectlink->amount;
|
||||
|
||||
@ -232,7 +232,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
$newcardbutton='';
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMemberType').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/adherents/type.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMemberType').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -256,9 +256,9 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$langs->trans("Ref").'</th>';
|
||||
print '<th>'.$langs->trans("Label").'</th>';
|
||||
print '<th align="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
||||
print '<th align="center">'.$langs->trans("VoteAllowed").'</th>';
|
||||
print '<th align="center">'.$langs->trans("Status").'</th>';
|
||||
print '<th class="center">'.$langs->trans("SubscriptionRequired").'</th>';
|
||||
print '<th class="center">'.$langs->trans("VoteAllowed").'</th>';
|
||||
print '<th class="center">'.$langs->trans("Status").'</th>';
|
||||
print '<th> </th>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -277,9 +277,9 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
//<a href="'.$_SERVER["PHP_SELF"].'?rowid='.$objp->rowid.'">'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.'</a>
|
||||
print '</td>';
|
||||
print '<td>'.dol_escape_htmltag($objp->label).'</td>';
|
||||
print '<td align="center">'.yn($objp->subscription).'</td>';
|
||||
print '<td align="center">'.yn($objp->vote).'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">'.yn($objp->subscription).'</td>';
|
||||
print '<td class="center">'.yn($objp->vote).'</td>';
|
||||
print '<td class="center">';
|
||||
if ( !empty($objp->statut) ) {
|
||||
print img_picto($langs->trans("InActivity"), 'statut4');
|
||||
} else {
|
||||
@ -586,15 +586,15 @@ if ($rowid > 0)
|
||||
// Lignes des champs de filtre
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'" size="12"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'" size="7"></td>';
|
||||
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" name="search_email" value="'.dol_escape_htmltag($search_email).'" size="12"></td>';
|
||||
|
||||
print '<td class="liste_titre"> </td>';
|
||||
@ -663,7 +663,7 @@ if ($rowid > 0)
|
||||
// Date end subscription
|
||||
if ($datefin)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($datefin < dol_now() && $objp->statut > 0)
|
||||
{
|
||||
print dol_print_date($datefin, 'day')." ".img_warning($langs->trans("SubscriptionLate"));
|
||||
@ -676,7 +676,7 @@ if ($rowid > 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td class="nowrap left">';
|
||||
if ($objp->subscription == 'yes')
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
@ -690,7 +690,7 @@ if ($rowid > 0)
|
||||
}
|
||||
|
||||
// Actions
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<a href="card.php?rowid='.$objp->rowid.'&action=edit&backtopage='.urlencode($_SERVER["PHP_SELF"].'?rowid='.$object->id).'">'.img_edit().'</a>';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2008-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -36,7 +36,8 @@ $action = GETPOST('action', 'alpha');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$arrayofparameters=array(
|
||||
'DAV_ALLOW_PUBLIC_DIR'=>array('css'=>'minwidth200', 'enabled'=>1),
|
||||
'DAV_ALLOW_PRIVATE_DIR'=>array('css'=>'minwidth200', 'enabled'=>2),
|
||||
'DAV_ALLOW_PUBLIC_DIR'=>array('css'=>'minwidth200', 'enabled'=>1),
|
||||
'DAV_ALLOW_ECM_DIR'=>array('css'=>'minwidth200', 'enabled'=>$conf->ecm->enabled)
|
||||
);
|
||||
|
||||
@ -84,7 +85,11 @@ if ($action == 'edit')
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
|
||||
print '</td><td>';
|
||||
if ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR')
|
||||
if ($key == 'DAV_ALLOW_PRIVATE_DIR')
|
||||
{
|
||||
print $langs->trans("AlwaysActive");
|
||||
}
|
||||
elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR')
|
||||
{
|
||||
print $form->selectyesno($key, $conf->global->$key, 1);
|
||||
}
|
||||
@ -114,7 +119,11 @@ else
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans($key), $langs->trans($key.'Tooltip'));
|
||||
print '</td><td>';
|
||||
if ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR')
|
||||
if ($key == 'DAV_ALLOW_PRIVATE_DIR')
|
||||
{
|
||||
print $langs->trans("AlwaysActive");
|
||||
}
|
||||
elseif ($key == 'DAV_ALLOW_PUBLIC_DIR' || $key == 'DAV_ALLOW_ECM_DIR')
|
||||
{
|
||||
print yn($conf->global->$key);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -47,8 +47,9 @@ if ($action == 'set')
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$result = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0);
|
||||
if ($result < 0)
|
||||
$result1 = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0);
|
||||
$result2 = dolibarr_set_const($db, "DEBUGBAR_USE_LOG_FILE", GETPOST('DEBUGBAR_USE_LOG_FILE', 'int'), 'chaine', 0, '', 0);
|
||||
if ($result1 < 0 || $result2 < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
@ -61,7 +62,7 @@ if ($action == 'set')
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessages($error, $errors, 'errors');
|
||||
setEventMessages($error, null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,6 +97,12 @@ print '<td colspan="2"><input type="text" class="flat" name="DEBUGBAR_LOGS_LINES
|
||||
print ' '.$langs->trans("WarningValueHigherSlowsDramaticalyOutput");
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_USE_LOG_FILE").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->selectyesno('DEBUGBAR_USE_LOG_FILE', $conf->global->DEBUGBAR_USE_LOG_FILE, 1);
|
||||
print ' '.$langs->trans("UsingLogFileShowAllRecordOfSubrequestButIsSlower");
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -207,7 +207,7 @@ else
|
||||
|
||||
print load_fiche_titre($langs->trans("DefaultValues"), $enabledisablehtml, 'title_setup');
|
||||
|
||||
print $langs->trans("DefaultValuesDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("DefaultValuesDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
@ -370,7 +370,7 @@ $tabfieldinsert[35]= "label";
|
||||
$tabfieldinsert[36]= "range_ik,fk_c_exp_tax_cat";
|
||||
$tabfieldinsert[37]= "code,label,short_label,unit_type,scale";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
// Rowid name if the field is not autoincrement type
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
// "nameoffield" if id field is not "rowid" or has not autoincrement on
|
||||
$tabrowid=array();
|
||||
@ -703,12 +703,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$_POST["code"]=preg_replace('/\s/', '', $_POST["code"]);
|
||||
}
|
||||
|
||||
// Si verif ok et action add, on ajoute la ligne
|
||||
// If check ok and action add, add the line
|
||||
if ($ok && GETPOST('actionadd'))
|
||||
{
|
||||
if ($tabrowid[$id])
|
||||
{
|
||||
// Recupere id libre pour insertion
|
||||
// Get free id for insert
|
||||
$newid=0;
|
||||
$sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id];
|
||||
$result = $db->query($sql);
|
||||
@ -771,7 +771,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
}
|
||||
}
|
||||
|
||||
// Si verif ok et action modify, on modifie la ligne
|
||||
// If verif ok and action modify, modify the line
|
||||
if ($ok && GETPOST('actionmodify'))
|
||||
{
|
||||
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
|
||||
@ -1382,7 +1382,7 @@ if ($id)
|
||||
$withentity = fieldList($fieldlist, $obj, $tabname[$id], 'edit');
|
||||
}
|
||||
|
||||
print '<td colspan="3" align="center">';
|
||||
print '<td colspan="3" class="center">';
|
||||
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
|
||||
print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">';
|
||||
print '<input type="hidden" name="rowid" value="'.dol_escape_htmltag($rowid).'">';
|
||||
@ -1549,7 +1549,7 @@ if ($id)
|
||||
$valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]});
|
||||
}
|
||||
elseif ($fieldlist[$field]=='localtax1' || $fieldlist[$field]=='localtax2') {
|
||||
$align="center";
|
||||
$class="center";
|
||||
}
|
||||
elseif ($fieldlist[$field]=='localtax1_type') {
|
||||
if ($obj->localtax1 != 0)
|
||||
@ -1644,14 +1644,14 @@ if ($id)
|
||||
// Only activated on country dictionary
|
||||
if ($id == 4)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($iserasable) print '<a class="reposition" href="'.$url.'action='.$acts[$obj->favorite].'_favorite">'.$actl[$obj->favorite].'</a>';
|
||||
else print $langs->trans("AlwaysActive");
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Active
|
||||
print '<td align="center" class="nowrap">';
|
||||
print '<td class="nowrap center">';
|
||||
if ($canbedisabled) print '<a class="reposition" href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
@ -1669,7 +1669,7 @@ if ($id)
|
||||
// Delete link
|
||||
if ($iserasable)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
|
||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||
print '</td>';
|
||||
@ -1872,7 +1872,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
|
||||
if ($fieldlist[$field] == 'type_cdr') print '<td align="center">';
|
||||
if ($fieldlist[$field] == 'type_cdr') print '<td class="center">';
|
||||
else print '<td>';
|
||||
if ($fieldlist[$field] == 'type_cdr') {
|
||||
print $form->selectarray($fieldlist[$field], array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
@ -1884,7 +1884,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
elseif (in_array($fieldlist[$field], array('nbjour','decalage','taux','localtax1','localtax2'))) {
|
||||
$align="left";
|
||||
if (in_array($fieldlist[$field], array('taux','localtax1','localtax2'))) $align="center"; // Fields aligned on right
|
||||
print '<td align="'.$align.'">';
|
||||
print '<td class="'.$align.'">';
|
||||
print '<input type="text" class="flat" value="'.(isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : '').'" size="3" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
}
|
||||
@ -1928,7 +1928,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
// Le type de taxe locale
|
||||
elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type')
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ class PrestaShopWebservice
|
||||
|
||||
/** @var array compatible versions of PrestaShop Webservice */
|
||||
const PSCOMPATIBLEVERSIONMIN = '1.4.0.0';
|
||||
const PSCOMPATIBLEVERSIONMAX = '1.6.99.99';
|
||||
const PSCOMPATIBLEVERSIONMAX = '1.7.99.99';
|
||||
|
||||
|
||||
/**
|
||||
@ -128,6 +128,7 @@ class PrestaShopWebservice
|
||||
CURLOPT_HTTPHEADER => array( 'Expect:' )
|
||||
);
|
||||
|
||||
dol_syslog("curl_init url=".$url);
|
||||
$session = curl_init($url);
|
||||
|
||||
$curl_options = array();
|
||||
@ -142,6 +143,7 @@ class PrestaShopWebservice
|
||||
if (!isset($curl_options[$defkey]))
|
||||
$curl_options[$defkey] = $curl_params[$defkey];
|
||||
|
||||
dol_syslog("curl curl_options = ".var_export($curl_options, true));
|
||||
curl_setopt_array($session, $curl_options);
|
||||
$response = curl_exec($session);
|
||||
|
||||
@ -309,7 +311,9 @@ class PrestaShopWebservice
|
||||
if (isset($options['id']))
|
||||
$url .= '/'.$options['id'];
|
||||
|
||||
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
|
||||
// @CHANGE LDR
|
||||
//$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop');
|
||||
$params = array('filter', 'display', 'sort', 'limit', 'id_shop', 'id_group_shop', 'date');
|
||||
foreach ($params as $p)
|
||||
foreach ($options as $k => $o)
|
||||
if (strpos($k, $p) !== false)
|
||||
@ -388,6 +392,47 @@ class PrestaShopWebservice
|
||||
self::checkStatusCode($request['status_code']);// check the response validity
|
||||
return self::parseXML($request['response']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete (DELETE) a resource.
|
||||
* Unique parameter must take : <br><br>
|
||||
* 'resource' => Resource name<br>
|
||||
* 'id' => ID or array which contains IDs of a resource(s) you want to delete<br><br>
|
||||
* <code>
|
||||
* <?php
|
||||
* require_once('./PrestaShopWebservice.php');
|
||||
* try
|
||||
* {
|
||||
* $ws = new PrestaShopWebservice('http://mystore.com/', 'ZQ88PRJX5VWQHCWE4EE7SQ7HPNX00RAJ', false);
|
||||
* $xml = $ws->delete(array('resource' => 'orders', 'id' => 1));
|
||||
* // Following code will not be executed if an exception is thrown.
|
||||
* echo 'Successfully deleted.';
|
||||
* }
|
||||
* catch (PrestaShopWebserviceException $ex)
|
||||
* {
|
||||
* echo 'Error : '.$ex->getMessage();
|
||||
* }
|
||||
* ?>
|
||||
* </code>
|
||||
* @param array $options Array representing resource to delete.
|
||||
*/
|
||||
public function delete($options)
|
||||
{
|
||||
if (isset($options['url']))
|
||||
$url = $options['url'];
|
||||
elseif (isset($options['resource']) && isset($options['id']))
|
||||
if (is_array($options['id']))
|
||||
$url = $this->url.'/api/'.$options['resource'].'/?id=['.implode(',', $options['id']).']';
|
||||
else
|
||||
$url = $this->url.'/api/'.$options['resource'].'/'.$options['id'];
|
||||
if (isset($options['id_shop']))
|
||||
$url .= '&id_shop='.$options['id_shop'];
|
||||
if (isset($options['id_group_shop']))
|
||||
$url .= '&id_group_shop='.$options['id_group_shop'];
|
||||
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE'));
|
||||
self::checkStatusCode($request['status_code']);// check the response validity
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -44,7 +44,6 @@ class Dolistore
|
||||
// setups
|
||||
public $url; // the url of this page
|
||||
public $shop_url; // the url of the shop
|
||||
public $vat_rate; // the vat rate used in the shop (prices are provided without vat)
|
||||
public $lang; // the integer representing the lang in the store
|
||||
public $debug_api; // usefull if no dialog
|
||||
|
||||
@ -60,12 +59,11 @@ class Dolistore
|
||||
|
||||
$this->url = DOL_URL_ROOT.'/admin/modules.php?mode=marketplace';
|
||||
$this->shop_url = 'https://www.dolistore.com/index.php?controller=product&id_product=';
|
||||
$this->vat_rate = 1.2; // 20% de TVA
|
||||
$this->debug_api = $debug;
|
||||
|
||||
$langtmp = explode('_', $langs->defaultlang);
|
||||
$lang = $langtmp[0];
|
||||
$lang_array = array('en'=>0, 'fr'=>1, 'es'=>2, 'it'=>3, 'de'=>4); // Into table ps_lang of Prestashop - 1
|
||||
$lang_array = array('en'=>1, 'fr'=>2, 'es'=>3, 'it'=>4, 'de'=>5); // Into table ps_lang of Prestashop - 1
|
||||
if (! in_array($lang, array_keys($lang_array))) $lang = 'en';
|
||||
$this->lang = $lang_array[$lang];
|
||||
}
|
||||
@ -74,12 +72,50 @@ class Dolistore
|
||||
* Load data from remote Dolistore market place.
|
||||
* This fills ->categories
|
||||
*
|
||||
* @param array $options Options
|
||||
* @return void
|
||||
*/
|
||||
public function getRemoteData($options = array('start' => 0, 'end' => 10, 'per_page' => 50, 'categorie' => 0))
|
||||
public function getRemoteCategories()
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf;
|
||||
|
||||
try {
|
||||
$this->api = new PrestaShopWebservice($conf->global->MAIN_MODULE_DOLISTORE_API_SRV, $conf->global->MAIN_MODULE_DOLISTORE_API_KEY, $this->debug_api);
|
||||
dol_syslog("Call API with MAIN_MODULE_DOLISTORE_API_SRV = ".$conf->global->MAIN_MODULE_DOLISTORE_API_SRV);
|
||||
// $conf->global->MAIN_MODULE_DOLISTORE_API_KEY is for the login of basic auth. There is no password as it is public data.
|
||||
|
||||
// Here we set the option array for the Webservice : we want categories resources
|
||||
$opt = array();
|
||||
$opt['resource'] = 'categories';
|
||||
$opt['display'] = '[id,id_parent,nb_products_recursive,active,is_root_category,name,description]';
|
||||
$opt['sort'] = 'id_asc';
|
||||
|
||||
// Call
|
||||
dol_syslog("Call API with opt = ".var_export($opt, true));
|
||||
$xml = $this->api->get($opt);
|
||||
$this->categories = $xml->categories->children();
|
||||
} catch (PrestaShopWebserviceException $e) {
|
||||
// Here we are dealing with errors
|
||||
$trace = $e->getTrace();
|
||||
if ($trace[0]['args'][0] == 404) die('Bad ID');
|
||||
elseif ($trace[0]['args'][0] == 401) die('Bad auth key');
|
||||
else
|
||||
{
|
||||
print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'<br>';
|
||||
print $e->getMessage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data from remote Dolistore market place.
|
||||
* This fills ->products
|
||||
*
|
||||
* @param array $options Options. If 'categorie' is defined, we filter products on this category id
|
||||
* @return void
|
||||
*/
|
||||
public function getRemoteProducts($options = array('start' => 0, 'end' => 10, 'per_page' => 50, 'categorie' => 0, 'search' => ''))
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->start = $options['start'];
|
||||
$this->end = $options['end'];
|
||||
@ -103,25 +139,26 @@ class Dolistore
|
||||
|
||||
// make a search to limit the id returned.
|
||||
if ($this->search != '') {
|
||||
$opt2['url'] = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/search?query='.$this->search.'&language='.$this->lang;
|
||||
$opt2['url'] = $conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'/api/search?query='.$this->search.'&language='.$this->lang; // It seems for search, key start with
|
||||
|
||||
// Call
|
||||
//var_dump($this->api);
|
||||
|
||||
dol_syslog("Call API with opt = ".var_export($opt, true));
|
||||
dol_syslog("Call API with opt2 = ".var_export($opt2, true));
|
||||
|
||||
$xml = $this->api->get($opt2);
|
||||
|
||||
$products = array();
|
||||
foreach ($xml->products->children() as $product) {
|
||||
$products[] = (int) $product['id'];
|
||||
}
|
||||
$opt['filter[id]'] = '['.implode('|', $products).']';
|
||||
} elseif ($this->categorie != 0) {
|
||||
} elseif ($this->categorie != 0) { // We filter on category, so we first get list of product id in this category
|
||||
// $opt2['url'] is set by default to $this->url.'/api/'.$options['resource'];
|
||||
$opt2['resource'] = 'categories';
|
||||
$opt2['id'] = $this->categorie;
|
||||
|
||||
// Call
|
||||
dol_syslog("Call API with opt2 = ".var_export($opt2, true));
|
||||
$xml = $this->api->get($opt2);
|
||||
|
||||
$products = array();
|
||||
foreach ($xml->category->associations->products->children() as $product) {
|
||||
$products[] = (int) $product->id;
|
||||
@ -134,22 +171,10 @@ class Dolistore
|
||||
$opt['limit'] = "$this->start,$this->end";
|
||||
// $opt['filter[id]'] contais list of product id that are result of search
|
||||
|
||||
|
||||
// Call API to get the detail
|
||||
dol_syslog("Call API with opt = ".var_export($opt, true));
|
||||
dol_syslog("Call API with opt2 = ".var_export($opt2, true));
|
||||
$xml = $this->api->get($opt);
|
||||
$this->products = $xml->products->children();
|
||||
|
||||
|
||||
// Here we set the option array for the Webservice : we want categories resources
|
||||
$opt = array();
|
||||
$opt['resource'] = 'categories';
|
||||
$opt['display'] = '[id,id_parent,nb_products_recursive,active,is_root_category,name,description]';
|
||||
$opt['sort'] = 'id_asc';
|
||||
// Call
|
||||
$xml = $this->api->get($opt);
|
||||
$this->categories = $xml->categories->children();
|
||||
} catch (PrestaShopWebserviceException $e) {
|
||||
// Here we are dealing with errors
|
||||
$trace = $e->getTrace();
|
||||
@ -186,15 +211,15 @@ class Dolistore
|
||||
$cat = $this->categories[$i];
|
||||
if ($cat->is_root_category == 1 && $parent == 0) {
|
||||
$html .= '<li class="root"><h3 class="nomargesupinf"><a class="nomargesupinf link2cat" href="?mode=marketplace&categorie='.$cat->id.'" '
|
||||
.'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang])).'"'
|
||||
.'>'.$cat->name->language[$this->lang].' <sup>'.$cat->nb_products_recursive.'</sup></a></h3>';
|
||||
.'title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'"'
|
||||
.'>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a></h3>';
|
||||
$html .= self::get_categories($cat->id);
|
||||
$html .= "</li>\n";
|
||||
} elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau
|
||||
$select = ($cat->id == $this->categorie) ? ' selected' : '';
|
||||
$html .= '<li><a class="link2cat'.$select.'" href="?mode=marketplace&categorie='.$cat->id.'"'
|
||||
.' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang])).'" '
|
||||
.'>'.$cat->name->language[$this->lang].' <sup>'.$cat->nb_products_recursive.'</sup></a>';
|
||||
.' title="'.dol_escape_htmltag(strip_tags($cat->description->language[$this->lang - 1])).'" '
|
||||
.'>'.$cat->name->language[$this->lang - 1].' <sup>'.$cat->nb_products_recursive.'</sup></a>';
|
||||
$html .= self::get_categories($cat->id);
|
||||
$html .= "</li>\n";
|
||||
} else {
|
||||
@ -242,7 +267,7 @@ class Dolistore
|
||||
// add image or default ?
|
||||
if ($product->id_default_image != '') {
|
||||
$image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image;
|
||||
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang].', '.$langs->trans('Version').' '.$product->module_version.'">'.
|
||||
$images = '<a href="'.$image_url.'" class="fancybox" rel="gallery'.$product->id.'" title="'.$product->name->language[$this->lang - 1].', '.$langs->trans('Version').' '.$product->module_version.'">'.
|
||||
'<img src="'.$image_url.'&quality=home_default" style="max-height:250px;max-width: 210px;" alt="" /></a>';
|
||||
} else {
|
||||
$images = '<img src="'.DOL_URL_ROOT.'/admin/dolistore/img/NoImageAvailable.png" />';
|
||||
@ -250,7 +275,7 @@ class Dolistore
|
||||
|
||||
// free or pay ?
|
||||
if ($product->price > 0) {
|
||||
$price = '<h3>'.price(round((float) $product->price * $this->vat_rate, 2)).' €</h3>';
|
||||
$price = '<h3>'.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'</h3>';
|
||||
$download_link = '<a target="_blank" href="'.$this->shop_url.$product->id.'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
|
||||
} else {
|
||||
$price = '<h3>'.$langs->trans('Free').'</h3>';
|
||||
@ -282,12 +307,12 @@ class Dolistore
|
||||
|
||||
//output template
|
||||
$html .= '<tr class="app '.$parity.' '.$compatible.'">
|
||||
<td align="center" width="210"><div class="newAppParent">'.$newapp.$images.'</div></td>
|
||||
<td class="margeCote"><h2 class="appTitle">'.$product->name->language[$this->lang]
|
||||
<td class="center" width="210"><div class="newAppParent">'.$newapp.$images.'</div></td>
|
||||
<td class="margeCote"><h2 class="appTitle">'.$product->name->language[$this->lang - 1]
|
||||
.'<br/><small>'.$version.'</small></h2>
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang].'</td>
|
||||
<td style="display:none;" class="long_description">'.$product->description->language[$this->lang].'</td>
|
||||
<td class="margeCote" align="center">'.$price.'
|
||||
<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'</small><br><br>'.$product->description_short->language[$this->lang - 1].'</td>
|
||||
<td style="display:none;" class="long_description">'.$product->description->language[$this->lang - 1].'</td>
|
||||
<td class="margeCote center">'.$price.'
|
||||
</td>
|
||||
<td class="margeCote">'.$download_link.'</td>
|
||||
</tr>';
|
||||
|
||||
@ -178,10 +178,9 @@ if ($action == 'confirm_collect')
|
||||
dol_include_once('/emailcollector/class/emailcollector.class.php');
|
||||
|
||||
$res = $object->doCollectOneCollector();
|
||||
|
||||
if ($res > 0)
|
||||
{
|
||||
setEventMessages($object->output, null, 'mesgs');
|
||||
setEventMessages($object->lastresult, null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -391,7 +390,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir);
|
||||
$connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir);
|
||||
|
||||
$connection = imap_open($connectstringsource, $object->user, $object->password);
|
||||
$connection = imap_open($connectstringsource, $object->login, $object->password);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -443,8 +442,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
// Add filter
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
$arrayoftypes=array('from'=>'MailFrom', 'to'=>'MailTo', 'cc'=>'Cc', 'bcc'=>'Bcc', 'subject'=>'Subject', 'body'=>'Body', 'seen'=>'AlreadyRead', 'unseen'=>'NotRead', 'withtrackingid'=>'WithDolTrackingID', 'withouttrackingid'=>'WithoutDolTrackingID');
|
||||
print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1);
|
||||
$arrayoftypes=array(
|
||||
'from'=>'MailFrom',
|
||||
'to'=>'MailTo',
|
||||
'cc'=>'Cc',
|
||||
'bcc'=>'Bcc',
|
||||
'subject'=>'Subject',
|
||||
'body'=>'Body',
|
||||
'X1'=>'---',
|
||||
'seen'=>'AlreadyRead',
|
||||
'unseen'=>'NotRead',
|
||||
'X2'=>'---',
|
||||
'withtrackingid'=>'WithDolTrackingID',
|
||||
'withouttrackingid'=>'WithoutDolTrackingID'
|
||||
);
|
||||
print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', '', 0, '', 2);
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="rulevalue">';
|
||||
print '</td>';
|
||||
@ -462,7 +474,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '</td>';
|
||||
print '<td>'.$rulefilter['rulevalue'].'</td>';
|
||||
print '<td class="right">';
|
||||
//print $rulefilterobj->getLibStatut(3);
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletefilter&filterid='.$rulefilter['id'].'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -321,7 +321,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$newcardbutton='';
|
||||
//if ($user->rights->emailcollector->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="emailcollector_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
//}
|
||||
|
||||
@ -254,7 +254,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file")
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
@ -285,7 +285,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
@ -336,10 +336,10 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="140">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td align="center" width="80" class="nowrap">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80" class="nowrap">'.$langs->trans("Preview").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td class="nowrap center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="nowrap center" width="80" >'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -391,7 +391,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -399,13 +399,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->EXPEDITION_ADDON_PDF == $name)
|
||||
{
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
@ -430,12 +430,12 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'sending').'</a>';
|
||||
|
||||
@ -216,8 +216,8 @@ print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -260,7 +260,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->EXPENSEREPORT_ADDON == $file)
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
@ -291,7 +291,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
@ -339,10 +339,10 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -393,7 +393,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -401,13 +401,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print "<td align=\"center\">";
|
||||
print '<td class="center">';
|
||||
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
@ -428,12 +428,12 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, -1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'intervention').'</a>';
|
||||
@ -472,7 +472,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td class="center" width="60"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
|
||||
@ -51,48 +51,52 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$page_name = "ExportSetup";
|
||||
llxHeader('', $langs->trans($page_name));
|
||||
|
||||
// Subheader
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">'
|
||||
. $langs->trans("BackToModuleList") . '</a>';
|
||||
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
|
||||
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback);
|
||||
|
||||
// Configuration header
|
||||
//$head = export_admin_prepare_head();
|
||||
$h=0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/export.php';
|
||||
$head[$h][1] = $langs->trans("Setup");
|
||||
$head[$h][2] = 'setup';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head(
|
||||
$head,
|
||||
'settings',
|
||||
$langs->trans("ExportsArea"),
|
||||
0,
|
||||
"exports"
|
||||
);
|
||||
dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports");
|
||||
|
||||
// Setup page goes here
|
||||
$form=new Form($db);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("ExportModel").'</td>'."\n";
|
||||
print '<td align="center" width="20"> </td>';
|
||||
print '<td align="center" width="100"></td>'."\n";
|
||||
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
print '<td class="center" width="20"> </td>';
|
||||
print '<td class="center" width="100"></td>'."\n";
|
||||
|
||||
|
||||
// Example with a yes / no select
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("set_EXPORTS_SHARE_MODELS").'</td>';
|
||||
print '<td align="center" width="20"> </td>';
|
||||
print '<td align="center" width="100">';
|
||||
print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
|
||||
print '<td class="center" width="20"> </td>';
|
||||
print '<td class="center" width="100">';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_EXPORTS_SHARE_MODELS">';
|
||||
echo ajax_constantonoff('EXPORTS_SHARE_MODELS');
|
||||
print '</form>';
|
||||
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -284,8 +284,8 @@ print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td class="nowrap">'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -344,7 +344,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
//print "> ".$conf->global->FACTURE_ADDON." - ".$file;
|
||||
if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file)
|
||||
{
|
||||
@ -415,7 +415,7 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
|
||||
if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
||||
@ -472,10 +472,10 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td align="center" width="32">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="32">'.$langs->trans("Preview").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Default").'</td>';
|
||||
print '<td class="center" width="32">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td class="center" width="32">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
@ -528,7 +528,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -536,13 +536,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("SetAsDefault"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print "<td align=\"center\">";
|
||||
print '<td class="center">';
|
||||
if ($conf->global->FACTURE_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
@ -570,12 +570,12 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftInvoices").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||
@ -742,7 +742,7 @@ print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td class="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -752,7 +752,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="action" value="setforcedate" />';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("ForceInvoiceDate");
|
||||
print '</td><td width="60" align="center">';
|
||||
print '</td><td width="60" class="center">';
|
||||
print $form->selectyesno("forcedate", $conf->global->FAC_FORCE_DATE_VALIDATION, 1);
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
@ -828,7 +828,7 @@ print load_fiche_titre($langs->trans("Notifications"), '', '');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td class="center" width="60"></td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ else
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("ActivateFCKeditor").'</td>';
|
||||
print '<td align="center" width="100">'.$langs->trans("Action").'</td>';
|
||||
print '<td class="center" width="100">'.$langs->trans("Action").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Modules
|
||||
@ -160,7 +160,7 @@ else
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="16">'.img_object("", $picto[$const]).'</td>';
|
||||
print '<td>'.$langs->trans($desc).'</td>';
|
||||
print '<td align="center" width="100">';
|
||||
print '<td class="center" width="100">';
|
||||
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
||||
$value = (isset($conf->global->$constante)?$conf->global->$constante:0);
|
||||
if ($value == 0)
|
||||
|
||||
@ -217,7 +217,7 @@ $formadmin=new FormAdmin($db);
|
||||
|
||||
print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup');
|
||||
|
||||
print $langs->trans("DisplayDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("DisplayDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
@ -37,11 +37,11 @@ $hookmanager->initHooks(array('homesetup'));
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
||||
llxHeader('', $langs->trans("Setup"), $wikihelp);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("SetupArea"), '', 'title_setup.png');
|
||||
|
||||
@ -68,7 +68,7 @@ if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
||||
}
|
||||
}
|
||||
|
||||
print $langs->trans("SetupDescription1").' ';
|
||||
print $langs->trans("SetupDescription1");
|
||||
print $langs->trans("AreaForAdminOnly").' ';
|
||||
print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules"))."<br><br>";
|
||||
|
||||
@ -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>';
|
||||
@ -115,7 +115,7 @@ print $hookmanager->resPrint;
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Show into other
|
||||
print $langs->trans("SetupDescription5")."<br>";
|
||||
print '<span class="opacitymedium">'.$langs->trans("SetupDescription5")."</span><br>";
|
||||
print "<br>";
|
||||
|
||||
// Show logo
|
||||
|
||||
@ -256,7 +256,7 @@ if ($action == 'delete')
|
||||
$newcardbutton='';
|
||||
if ($user->admin)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/admin/menus/edit.php?menuId=0&action=create&menu_handler='.urlencode($menu_handler).'&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -84,13 +84,13 @@ dol_fiche_head($head, 'misc', $langs->trans("Menus"), -1);
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Status").'</td>';
|
||||
print '<td class="center" width="80">'.$langs->trans("Status").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized menu
|
||||
print '<tr class="oddeven">';
|
||||
print '<td colspan="3">'.$langs->trans("HideUnauthorizedMenu").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=activate_hidemenu">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
|
||||
@ -888,7 +888,8 @@ if ($mode == 'marketplace')
|
||||
{
|
||||
// $options is array with filter criterias
|
||||
//var_dump($options);
|
||||
$dolistore->getRemoteData($options);
|
||||
$dolistore->getRemoteCategories();
|
||||
$dolistore->getRemoteProducts($options);
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans('DOLISTOREdescriptionLong').'</span><br><br>';
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ $arraydetailsforpdffoot = array(
|
||||
|
||||
print load_fiche_titre($langs->trans("PDF"), '', 'title_setup');
|
||||
|
||||
print $langs->trans("PDFDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("PDFDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$noCountryCode = (empty($mysoc->country_code) ? true : false);
|
||||
|
||||
@ -446,7 +446,7 @@ if ($resql)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="tdoverflowmax300">'.$obj->name.'</td>'."\n";
|
||||
print '<td class="tdoverflowmax300">'.dol_escape_htmltag($obj->value).'</td>'."\n";
|
||||
if (empty($conf->multicompany->enabled) || !$user->entity) print '<td align="center" width="80px">'.$obj->entity.'</td>'."\n"; // If superadmin or multicompany disabled
|
||||
if (empty($conf->multicompany->enabled) || !$user->entity) print '<td class="center" width="80px">'.$obj->entity.'</td>'."\n"; // If superadmin or multicompany disabled
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
|
||||
@ -171,8 +171,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
$out.='<td>' . $langs->trans("Constant") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("ExpectedValue") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("Value") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("ExpectedValue") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("Value") . '</td>';
|
||||
$out.='</tr>'."\n";
|
||||
|
||||
$i = 0;
|
||||
@ -192,8 +192,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td>'.$i.'</td>' . "\n";
|
||||
$out.='<td>'.$constname.'</td>' . "\n";
|
||||
$out.='<td align="center">'.$constvalue.'</td>' . "\n";
|
||||
$out.='<td align="center">'.$valueforchecksum.'</td>' . "\n";
|
||||
$out.='<td class="center">'.$constvalue.'</td>' . "\n";
|
||||
$out.='<td class="center">'.$valueforchecksum.'</td>' . "\n";
|
||||
$out.="</tr>\n";
|
||||
}
|
||||
|
||||
@ -239,7 +239,7 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
$out.='<td>' . $langs->trans("Filename") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='</tr>'."\n";
|
||||
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
||||
if (is_array($tmpfilelist) && count($tmpfilelist))
|
||||
@ -251,7 +251,7 @@ if (! $error && $xml)
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td>'.$i.'</td>' . "\n";
|
||||
$out.='<td>'.$file['filename'].'</td>' . "\n";
|
||||
$out.='<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.="</tr>\n";
|
||||
}
|
||||
}
|
||||
@ -273,8 +273,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
$out.='<td>' . $langs->trans("Filename") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
||||
$out.='<td class="right">' . $langs->trans("Size") . '</td>';
|
||||
$out.='<td class="right">' . $langs->trans("DateModification") . '</td>';
|
||||
$out.='</tr>'."\n";
|
||||
@ -288,8 +288,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="oddeven">';
|
||||
$out.='<td>'.$i.'</td>' . "\n";
|
||||
$out.='<td>'.$file['filename'].'</td>' . "\n";
|
||||
$out.='<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.='<td align="center">'.$file['md5'].'</td>' . "\n";
|
||||
$out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.='<td class="center">'.$file['md5'].'</td>' . "\n";
|
||||
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
|
||||
$totalsize += $size;
|
||||
$out.='<td class="right">'.dol_print_size($size).'</td>' . "\n";
|
||||
@ -299,8 +299,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_total">';
|
||||
$out.='<td></td>' . "\n";
|
||||
$out.='<td>'.$langs->trans("Total").'</td>' . "\n";
|
||||
$out.='<td align="center"></td>' . "\n";
|
||||
$out.='<td align="center"></td>' . "\n";
|
||||
$out.='<td class="center"></td>' . "\n";
|
||||
$out.='<td class="center"></td>' . "\n";
|
||||
$out.='<td class="right">'.dol_print_size($totalsize).'</td>' . "\n";
|
||||
$out.='<td class="right"></td>' . "\n";
|
||||
$out.="</tr>\n";
|
||||
@ -323,8 +323,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_titre">';
|
||||
$out.='<td>#</td>';
|
||||
$out.='<td>' . $langs->trans("Filename") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='<td align="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("ExpectedChecksum") . '</td>';
|
||||
$out.='<td class="center">' . $langs->trans("CurrentChecksum") . '</td>';
|
||||
$out.='<td class="right">' . $langs->trans("Size") . '</td>';
|
||||
$out.='<td class="right">' . $langs->trans("DateModification") . '</td>';
|
||||
$out.='</tr>'."\n";
|
||||
@ -343,8 +343,8 @@ if (! $error && $xml)
|
||||
$out.=' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i);
|
||||
}
|
||||
$out.='</td>' . "\n";
|
||||
$out.='<td align="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.='<td align="center">'.$file['md5'].'</td>' . "\n";
|
||||
$out.='<td class="center">'.$file['expectedmd5'].'</td>' . "\n";
|
||||
$out.='<td class="center">'.$file['md5'].'</td>' . "\n";
|
||||
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
|
||||
$totalsize += $size;
|
||||
$out.='<td class="right">'.dol_print_size($size).'</td>' . "\n";
|
||||
@ -354,8 +354,8 @@ if (! $error && $xml)
|
||||
$out.='<tr class="liste_total">';
|
||||
$out.='<td></td>' . "\n";
|
||||
$out.='<td>'.$langs->trans("Total").'</td>' . "\n";
|
||||
$out.='<td align="center"></td>' . "\n";
|
||||
$out.='<td align="center"></td>' . "\n";
|
||||
$out.='<td class="center"></td>' . "\n";
|
||||
$out.='<td class="center"></td>' . "\n";
|
||||
$out.='<td class="right">'.dol_print_size($totalsize).'</td>' . "\n";
|
||||
$out.='<td class="right"></td>' . "\n";
|
||||
$out.="</tr>\n";
|
||||
|
||||
@ -107,7 +107,7 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Modules").'</td>';
|
||||
print '<td>'.$langs->trans("Version").'</td>';
|
||||
print '<td align="center">'.$langs->trans("IdModule").'</td>';
|
||||
print '<td class="center">'.$langs->trans("IdModule").'</td>';
|
||||
print '<td>'.$langs->trans("IdPermissions").'</td>';
|
||||
print '</tr>';
|
||||
$var=false;
|
||||
@ -134,7 +134,7 @@ foreach($sortorder as $numero=>$name)
|
||||
// Version
|
||||
print '<td>'.$modules[$numero]->getVersion().'</td>';
|
||||
// Id
|
||||
print '<td align="center">'.$numero.'</td>';
|
||||
print '<td class="center">'.$numero.'</td>';
|
||||
// Permissions
|
||||
if ($modules[$numero]->rights)
|
||||
{
|
||||
|
||||
@ -446,7 +446,7 @@ print "\n";
|
||||
|
||||
|
||||
<br>
|
||||
<div align="center"><input type="submit" class="button"
|
||||
<div class="center"><input type="submit" class="button"
|
||||
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
|
||||
<br>
|
||||
|
||||
@ -575,7 +575,7 @@ print "\n";
|
||||
|
||||
?>
|
||||
<br>
|
||||
<div align="center"><input type="submit" class="button"
|
||||
<div class="center"><input type="submit" class="button"
|
||||
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
@ -173,10 +173,10 @@ function create_script_table($list)
|
||||
foreach($list as $script) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.dol_trunc($script['file'], 80, 'left').'</td>';
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($script['mtime'], 'dayhour').'</td>';
|
||||
print '<td class="right" class="nowrap">'.number_format($script['size'] / 1024, 2).'KB</td>';
|
||||
print '<td class="right" class="nowrap">'.$script['reloads'].' ('.$script['usecount'].')</td>';
|
||||
print '<td class="right" class="nowrap">'.$script['hits'].'</td>';
|
||||
print '<td class="nowrap center">'.dol_print_date($script['mtime'], 'dayhour').'</td>';
|
||||
print '<td class="nowrap right">'.number_format($script['size'] / 1024, 2).'KB</td>';
|
||||
print '<td class="nowrap right">'.$script['reloads'].' ('.$script['usecount'].')</td>';
|
||||
print '<td class="nowrap right">'.$script['hits'].'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</table>';
|
||||
@ -203,9 +203,9 @@ function create_key_table($list)
|
||||
foreach($list as $key) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.dol_trunc($key['name'], 80, 'left').'</td>';
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($key['created'], 'dayhour').'</td>';
|
||||
print '<td class="right" class="nowrap">'.number_format($key['size']/1024, 3).'KB</td>';
|
||||
print '<td class="right" class="nowrap">';
|
||||
print '<td class="nowrap center">'.dol_print_date($key['created'], 'dayhour').'</td>';
|
||||
print '<td class="nowrap right">'.number_format($key['size']/1024, 3).'KB</td>';
|
||||
print '<td class="nowrap right">';
|
||||
if ($key['ttl'] == -1) {
|
||||
print 'expired';
|
||||
} elseif ($key['ttl'] == 0) {
|
||||
|
||||
@ -238,20 +238,20 @@ if ($result)
|
||||
|
||||
print '<td class="liste_titre" width="15%">'.$form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0).'</td>';
|
||||
|
||||
print '<td align="left" class="liste_titre">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_code" value="'.$search_code.'">';
|
||||
print '</td>';
|
||||
|
||||
// IP
|
||||
print '<td align="left" class="liste_titre">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_ip" value="'.$search_ip.'">';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="left" class="liste_titre">';
|
||||
print '<td class="liste_titre left">';
|
||||
print '<input class="flat" type="text" size="10" name="search_user" value="'.$search_user.'">';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="left" class="liste_titre">';
|
||||
print '<td class="liste_titre left">';
|
||||
//print '<input class="flat" type="text" size="10" name="search_desc" value="'.$search_desc.'">';
|
||||
print '</td>';
|
||||
|
||||
@ -279,7 +279,7 @@ if ($result)
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Date
|
||||
print '<td align="left" class="nowrap">'.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
print '<td class="nowrap left">'.dol_print_date($db->jdate($obj->dateevent), '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
|
||||
// Code
|
||||
print '<td>'.$obj->type.'</td>';
|
||||
|
||||
@ -142,16 +142,16 @@ if ($savehandler == 'files')
|
||||
print '<td>'.$sessionentry['login'].'</td>';
|
||||
|
||||
// ID
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td class="nowrap left">';
|
||||
if ("$key" == session_id()) print $form->textwithpicto($key, $langs->trans("YourSession"));
|
||||
else print $key;
|
||||
print '</td>';
|
||||
|
||||
// Date creation
|
||||
print '<td align="left" class="nowrap">'.dol_print_date($sessionentry['creation'], '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
print '<td class="nowrap left">'.dol_print_date($sessionentry['creation'], '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
|
||||
// Date modification
|
||||
print '<td align="left" class="nowrap">'.dol_print_date($sessionentry['modification'], '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
print '<td class="nowrap left">'.dol_print_date($sessionentry['modification'], '%Y-%m-%d %H:%M:%S').'</td>';
|
||||
|
||||
// Age
|
||||
print '<td>'.$sessionentry['age'].'</td>';
|
||||
|
||||
@ -224,14 +224,12 @@ else
|
||||
|
||||
print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup');
|
||||
|
||||
//print '<span class="opacitymedium">';
|
||||
print $langs->trans("TranslationDesc")."<br>\n";
|
||||
//print '</span>';
|
||||
print "<br>\n";
|
||||
//print '<span class="opacitymedium">'.$langs->trans("TranslationDesc")."</span><br>\n";
|
||||
//print "<br>\n";
|
||||
|
||||
$current_language_code=$langs->defaultlang;
|
||||
$s=picto_from_langcode($current_language_code);
|
||||
print $langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language_code.'</strong><br>';
|
||||
print $form->textwithpicto($langs->trans("CurrentUserLanguage").': <strong>'.$s.' '.$current_language_code.'</strong>', $langs->trans("TranslationDesc")).'<br>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ if ($object->id)
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Number of files
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
|
||||
@ -316,13 +316,13 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$newcardbutton='';
|
||||
//if ($user->rights->bom->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="bom_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// $newcardbutton='<a class="butActionNewRefused" href="#">'.$langs->trans('New');
|
||||
// $newcardbutton='<a class="butActionNewRefused" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
// $newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
// $newcardbutton.= '</a>';
|
||||
//}
|
||||
|
||||
@ -604,7 +604,7 @@ class BOM extends CommonObject
|
||||
*/
|
||||
public function setDraft($user)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
@ -630,6 +630,11 @@ class BOM extends CommonObject
|
||||
dol_syslog(get_class($this)."::setDraft", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('BOM_UNVALIDATE', $user);
|
||||
@ -640,7 +645,7 @@ class BOM extends CommonObject
|
||||
$this->status=self::STATUS_DRAFT;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}else {
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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
|
||||
@ -64,6 +64,11 @@ class Bookmark extends CommonObject
|
||||
*/
|
||||
public $fk_user;
|
||||
|
||||
/**
|
||||
* Date creation record (datec)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
public $url;
|
||||
|
||||
@ -84,7 +84,7 @@ llxHeader('', $langs->trans("ListOfBookmarks"));
|
||||
$newcardbutton='';
|
||||
if ($user->rights->bookmark->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewBookmark').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBookmark').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
|
||||
|
||||
llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle">'.$langs->trans("NewCategory").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewCategory").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
|
||||
|
||||
@ -903,7 +903,7 @@ if ($action == 'create')
|
||||
|
||||
$numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create">'.$langs->trans("AddProject").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
$urloption='?action=create';
|
||||
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
|
||||
|
||||
@ -1301,7 +1301,7 @@ if ($id > 0)
|
||||
$numprojet=$formproject->select_projects(($object->socid > 0 ? $object->socid : -1), $object->fk_project, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0);
|
||||
if ($numprojet==0)
|
||||
{
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->socid.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit').'">'.$langs->trans("AddProject").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->socid.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -435,7 +435,7 @@ if ($resql)
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -367,7 +367,7 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction
|
||||
|
||||
//$param='month='.$monthshown.'&year='.$year;
|
||||
$hourminsec='100000';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam?'?'.$newparam:'')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ if (empty($reshook))
|
||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
// conditions de reglement
|
||||
// terms of the settlement
|
||||
if ($action == 'setconditions' && $user->rights->societe->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
@ -317,7 +317,7 @@ if ($object->id > 0)
|
||||
print $object->tva_intra;
|
||||
print '</td></tr>';
|
||||
|
||||
// Conditions de reglement par defaut
|
||||
// default terms of the settlement
|
||||
$langs->load('bills');
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
|
||||
@ -156,7 +156,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->mailing->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewMailing').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/mailing/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewMailing').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -1039,7 +1039,8 @@ if (empty($reshook))
|
||||
$desc = $prod->description;
|
||||
}
|
||||
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc= $product_desc;
|
||||
else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
|
||||
// Add dimensions into product description
|
||||
/*if (empty($conf->global->MAIN_PRODUCT_DISABLE_AUTOADD_DIM))
|
||||
@ -1590,7 +1591,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
@ -1624,7 +1625,7 @@ if ($action == 'create')
|
||||
|
||||
// Terms of payment
|
||||
print '<tr><td class="nowrap fieldrequired">' . $langs->trans('PaymentConditionsShort') . '</td><td>';
|
||||
$form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id');
|
||||
$form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id', -1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Mode of payment
|
||||
@ -1677,7 +1678,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Project") . '</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . ' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
@ -2047,11 +2048,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Date');
|
||||
print '</td>';
|
||||
if ($action != 'editdate' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdate&id=' . $object->id . '">' . img_edit($langs->trans('SetDate'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editdate' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) {
|
||||
print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setdate">';
|
||||
@ -2073,11 +2074,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DateEndPropal');
|
||||
print '</td>';
|
||||
if ($action != 'editecheance' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editecheance&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editecheance' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) {
|
||||
print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="setecheance">';
|
||||
@ -2101,11 +2102,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($action != 'editconditions' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editconditions' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id');
|
||||
} else {
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none');
|
||||
@ -2129,11 +2130,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
if (! empty($conf->commande->enabled))
|
||||
print ' (' . $langs->trans('AfterOrder') . ')';
|
||||
print '</td>';
|
||||
if ($action != 'editavailability' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editavailability' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editavailability' && $usercancreate) {
|
||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1);
|
||||
} else {
|
||||
$form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1);
|
||||
@ -2166,11 +2167,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Source');
|
||||
print '</td>';
|
||||
if ($action != 'editdemandreason' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editdemandreason' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdemandreason' && $usercancreate) {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1);
|
||||
} else {
|
||||
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
|
||||
@ -2184,11 +2185,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editmode' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1);
|
||||
} else {
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none');
|
||||
@ -2204,11 +2205,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencycode' && ! empty($object->brouillon) && $usercancreate)
|
||||
if ($action != 'editmulticurrencycode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && $action == 'editmulticurrencycode' && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code');
|
||||
} else {
|
||||
$form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none');
|
||||
@ -2221,11 +2222,11 @@ $formquestion = array_merge($formquestion, array(
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate)
|
||||
if ($action != 'editmulticurrencyrate' && $object->statut == Propal::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if (! empty($object->brouillon) && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) {
|
||||
if ($object->statut == Propal::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) {
|
||||
if($action == 'actualizemulticurrencyrate') {
|
||||
list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code);
|
||||
}
|
||||
|
||||
@ -439,6 +439,7 @@ class Propal extends CommonObject
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::addline propalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type, fk_remise_except=".$fk_remise_except);
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
@ -472,6 +473,12 @@ class Propal extends CommonObject
|
||||
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -629,7 +636,7 @@ class Propal extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::addline status of order must be Draft to allow use of ->addline()", LOG_ERR);
|
||||
dol_syslog(get_class($this)."::addline status of proposal must be Draft to allow use of ->addline()", LOG_ERR);
|
||||
return -3;
|
||||
}
|
||||
}
|
||||
@ -665,7 +672,7 @@ class Propal extends CommonObject
|
||||
*/
|
||||
public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0)
|
||||
{
|
||||
global $mysoc;
|
||||
global $mysoc, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
|
||||
txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end");
|
||||
@ -683,6 +690,12 @@ class Propal extends CommonObject
|
||||
if (empty($qty) && empty($special_code)) $special_code=3; // Set option tag
|
||||
if (! empty($qty) && $special_code == 3) $special_code=0; // Remove option tag
|
||||
if (empty($type)) $type=0;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
@ -2610,12 +2623,20 @@ class Propal extends CommonObject
|
||||
// phpcs:enable
|
||||
$error=0;
|
||||
|
||||
// Protection
|
||||
if ($this->statut <= self::STATUS_DRAFT)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::setDraft", LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_statut = ".self::STATUS_DRAFT;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||
$sql.= " SET fk_statut = ".self::STATUS_DRAFT;
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if (!$resql)
|
||||
{
|
||||
@ -2626,8 +2647,6 @@ class Propal extends CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
$this->statut = self::STATUS_DRAFT;
|
||||
$this->brouillon = 1;
|
||||
}
|
||||
|
||||
if (! $notrigger && empty($error))
|
||||
@ -2640,7 +2659,10 @@ class Propal extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
$this->statut = self::STATUS_DRAFT;
|
||||
$this->brouillon = 1;
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -155,7 +155,7 @@ if ($object->id > 0)
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Files infos
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td>'.count($filearray).'</td></tr>';
|
||||
|
||||
@ -438,7 +438,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->propal->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewPropal').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/propal/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewPropal').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
11
htdocs/commande/card.php
Normal file → Executable file
11
htdocs/commande/card.php
Normal file → Executable file
@ -5,7 +5,7 @@
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
@ -868,7 +868,8 @@ if (empty($reshook))
|
||||
$desc = $prod->description;
|
||||
}
|
||||
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc= $product_desc;
|
||||
else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
|
||||
// Add custom code and origin country into description
|
||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
||||
@ -1636,7 +1637,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
@ -1674,7 +1675,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print $form->selectDate($datedelivery, 'liv_', '', '', '', "crea_commande", 1, 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Conditions de reglement
|
||||
// terms of the settlement
|
||||
print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>';
|
||||
$form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', - 1, 1);
|
||||
print '</td></tr>';
|
||||
@ -1727,7 +1728,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Project") . '</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . ' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -499,16 +499,22 @@ class Commande extends CommonOrder
|
||||
return -1;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande";
|
||||
$sql.= " SET fk_statut = ".self::STATUS_DRAFT;
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
}
|
||||
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
{
|
||||
$result = 0;
|
||||
@ -1069,7 +1075,7 @@ class Commande extends CommonOrder
|
||||
*/
|
||||
public function createFromClone($socid = 0)
|
||||
{
|
||||
global $user,$hookmanager;
|
||||
global $conf, $user,$hookmanager;
|
||||
|
||||
$error=0;
|
||||
|
||||
@ -1079,69 +1085,88 @@ class Commande extends CommonOrder
|
||||
foreach($this->lines as $line)
|
||||
$line->fetch_optionals();
|
||||
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
// Load source object
|
||||
$objFrom = clone $this;
|
||||
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $this->socid)
|
||||
// Change socid if needed
|
||||
if (! empty($socid) && $socid != $this->socid)
|
||||
{
|
||||
$objsoc = new Societe($this->db);
|
||||
|
||||
if ($objsoc->fetch($socid)>0)
|
||||
{
|
||||
$objsoc = new Societe($this->db);
|
||||
|
||||
if ($objsoc->fetch($socid)>0)
|
||||
{
|
||||
$this->socid = $objsoc->id;
|
||||
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$this->fk_project = 0;
|
||||
$this->fk_delivery_address = 0;
|
||||
}
|
||||
|
||||
// TODO Change product price if multi-prices
|
||||
$this->socid = $objsoc->id;
|
||||
$this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
|
||||
$this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
|
||||
$this->fk_project = 0;
|
||||
$this->fk_delivery_address = 0;
|
||||
}
|
||||
|
||||
$this->id=0;
|
||||
$this->ref = '';
|
||||
$this->statut=self::STATUS_DRAFT;
|
||||
// TODO Change product price if multi-prices
|
||||
}
|
||||
|
||||
// Clear fields
|
||||
$this->user_author_id = $user->id;
|
||||
$this->user_valid = '';
|
||||
$this->date = dol_now();
|
||||
$this->date_commande = dol_now();
|
||||
$this->date_creation = '';
|
||||
$this->date_validation = '';
|
||||
$this->ref_client = '';
|
||||
$this->id=0;
|
||||
$this->ref = '';
|
||||
$this->statut=self::STATUS_DRAFT;
|
||||
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
// Clear fields
|
||||
$this->user_author_id = $user->id;
|
||||
$this->user_valid = '';
|
||||
$this->date = dol_now();
|
||||
$this->date_commande = dol_now();
|
||||
$this->date_creation = '';
|
||||
$this->date_validation = '';
|
||||
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $this->ref_client = '';
|
||||
|
||||
if (! $error)
|
||||
// Create clone
|
||||
$this->context['createfromclone'] = 'createfromclone';
|
||||
$result=$this->create($user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
// copy internal contacts
|
||||
if ($this->copy_linked_contact($objFrom, 'internal') < 0)
|
||||
{
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$parameters=array('objFrom'=>$objFrom);
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
if (! $error)
|
||||
{
|
||||
// copy external contacts if same company
|
||||
if ($this->socid == $objFrom->socid)
|
||||
{
|
||||
if ($this->copy_linked_contact($objFrom, 'external') < 0)
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
if (! $error)
|
||||
{
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager))
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
$parameters=array('objFrom'=>$objFrom);
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) $error++;
|
||||
}
|
||||
}
|
||||
|
||||
unset($this->context['createfromclone']);
|
||||
|
||||
// End
|
||||
if (! $error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1219,8 +1244,12 @@ class Commande extends CommonOrder
|
||||
$this->fk_delivery_address = $object->fk_delivery_address;
|
||||
$this->contact_id = $object->contactid;
|
||||
$this->ref_client = $object->ref_client;
|
||||
$this->note_private = $object->note_private;
|
||||
$this->note_public = $object->note_public;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))
|
||||
{
|
||||
$this->note_private = $object->note_private;
|
||||
$this->note_public = $object->note_public;
|
||||
}
|
||||
|
||||
$this->origin = $object->element;
|
||||
$this->origin_id = $object->id;
|
||||
@ -1358,6 +1387,12 @@ class Commande extends CommonOrder
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$product_type=$type;
|
||||
@ -2920,9 +2955,8 @@ class Commande extends CommonOrder
|
||||
dol_syslog(get_class($this)."::updateline id=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, date_start=$date_start, date_end=$date_end, type=$type, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, special_code=$special_code");
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
if (! empty($this->brouillon))
|
||||
if ($this->statut == Propal::STATUS_DRAFT)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
// Clean parameters
|
||||
if (empty($qty)) $qty=0;
|
||||
@ -2933,6 +2967,12 @@ class Commande extends CommonOrder
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
if (empty($special_code) || $special_code == 3) $special_code=0;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$remise_percent=price2num($remise_percent);
|
||||
$qty=price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
@ -2942,6 +2982,8 @@ class Commande extends CommonOrder
|
||||
$txlocaltax1=price2num($txlocaltax1);
|
||||
$txlocaltax2=price2num($txlocaltax2);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
// qty, pu, remise_percent et txtva
|
||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||
|
||||
@ -160,7 +160,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
@ -441,7 +441,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($contextpage == 'orderlist' && $user->rights->commande->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/commande/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -497,12 +497,12 @@ if ($resql)
|
||||
print '<td>';
|
||||
if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
{
|
||||
print $form->selectyesno('valdate_invoices', 0, 1, 1);
|
||||
print $form->selectyesno('validate_invoices', 0, 1, 1);
|
||||
print ' ('.$langs->trans("AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation").')';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $form->selectyesno('valdate_invoices', 0, 1);
|
||||
print $form->selectyesno('validate_invoices', 0, 1);
|
||||
}
|
||||
if (! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER)) print ' <span class="opacitymedium">'.$langs->trans("IfValidateInvoiceIsNoOrderStayUnbilled").'</span>';
|
||||
else print ' <span class="opacitymedium">'.$langs->trans("OptionToSetOrderBilledNotEnabled").'</span>';
|
||||
|
||||
@ -757,11 +757,11 @@ if ($resql)
|
||||
if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord");
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -769,11 +769,11 @@ if ($resql)
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
{
|
||||
if ($user->rights->banque->modifier) {
|
||||
$newcardbutton = '<a class="butActionNew" href="'.$_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param.'">'.$langs->trans("AddBankRecord");
|
||||
$newcardbutton = '<a class="butActionNew" href="'.$_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
} else {
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord");
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
@ -781,7 +781,7 @@ if ($resql)
|
||||
}
|
||||
else
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord");
|
||||
$newcardbutton = '<a class="butActionNewRefused" title="'.$langs->trans("FeatureDisabled").'" href="#"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddBankRecord").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -1546,8 +1546,8 @@ class Account extends CommonObject
|
||||
* Some countries show less or more bank account properties to the user
|
||||
*
|
||||
* @param int $includeibanbic 1=Return also key for IBAN and BIC
|
||||
* @return array
|
||||
* @see useDetailedBBAN
|
||||
* @return array Array of fields to show
|
||||
* @see useDetailedBBAN()
|
||||
*/
|
||||
public function getFieldsToShow($includeibanbic = 0)
|
||||
{
|
||||
@ -1693,13 +1693,27 @@ class AccountLine extends CommonObject
|
||||
*/
|
||||
public $ref;
|
||||
|
||||
public $datec;
|
||||
/**
|
||||
* Date creation record (datec)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* Date (dateo)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $dateo;
|
||||
|
||||
/**
|
||||
* Value date
|
||||
*/
|
||||
* Date value (datev)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datev;
|
||||
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
|
||||
@ -122,7 +122,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
print '<tr><td class="titlefield">' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' .dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
print "</table>\n";
|
||||
|
||||
@ -227,7 +227,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->configurer)
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle">'.$langs->trans("NewFinancialAccount").'</span>';
|
||||
$newcardbutton.='<a class="butActionNew" href="card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("NewFinancialAccount").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ if ($object->id)
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
|
||||
@ -157,7 +157,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create"><span class="valignmiddle">'.$langs->trans('MenuNewVariousPayment').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('MenuNewVariousPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -337,7 +337,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
$newcardbutton='';
|
||||
//if ($user->rights->monmodule->creer)
|
||||
//{
|
||||
$newcardbutton='<a class="butActionNew" href="cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="cashcontrol_card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'"><span class="valignmiddle text-plus-circle">'.$langs->trans('New').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
//}
|
||||
|
||||
@ -57,7 +57,18 @@ class Deplacement extends CommonObject
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
public $datec; // Creation date
|
||||
/**
|
||||
* Date creation record (datec)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* Date (dated)
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
public $dated;
|
||||
|
||||
/**
|
||||
|
||||
@ -100,7 +100,7 @@ if ($object->id)
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/deplacement/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
|
||||
17
htdocs/compta/facture/card.php
Normal file → Executable file
17
htdocs/compta/facture/card.php
Normal file → Executable file
@ -1303,7 +1303,6 @@ if (empty($reshook))
|
||||
$tva_tx = $lines[$i]->tva_tx;
|
||||
$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $valuedeposit) / 100;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($totalamount == 0) {
|
||||
@ -1329,7 +1328,7 @@ if (empty($reshook))
|
||||
} elseif ($typeamount=='variable') {
|
||||
$descline.= ' ('. $valuedeposit.'%)';
|
||||
}
|
||||
|
||||
|
||||
$descline.= ' - '.$srcobject->ref;
|
||||
$result = $object->addline(
|
||||
$descline,
|
||||
@ -1845,7 +1844,8 @@ if (empty($reshook))
|
||||
$desc = $prod->description;
|
||||
}
|
||||
|
||||
$desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc= $product_desc;
|
||||
else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
|
||||
// Add custom code and origin country into description
|
||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
||||
@ -2698,7 +2698,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
@ -3094,7 +3094,7 @@ if ($action == 'create')
|
||||
$langs->load('projects');
|
||||
print '<tr><td>' . $langs->trans('Project') . '</td><td colspan="2">';
|
||||
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec?'&fac_rec='.$fac_rec:'')).'">' . $langs->trans("AddProject") . ' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec?'&fac_rec='.$fac_rec:'')).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -4280,7 +4280,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits');
|
||||
else
|
||||
print $langs->trans('AlreadyPaid');
|
||||
print ' :</td><td class="right"'.(($totalpaye > 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . '</td><td> </td></tr>';
|
||||
print ' :</td><td class="right'.(($totalpaye > 0)?' amountalreadypaid':'').'">' . price($totalpaye) . '</td><td> </td></tr>';
|
||||
|
||||
$resteapayeraffiche = $resteapayer;
|
||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||
@ -4359,14 +4359,13 @@ elseif ($id > 0 || ! empty($ref))
|
||||
|
||||
// Billed
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">' . $langs->trans("Billed") . ' :</td><td class="right">' . price($object->total_ttc) . '</td><td> </td></tr>';
|
||||
|
||||
// Remainder to pay
|
||||
print '<tr><td colspan="' . $nbcols . '" class="right">';
|
||||
print $langs->trans('RemainderToPay');
|
||||
if ($resteapayeraffiche < 0)
|
||||
print ' ('.$langs->trans('ExcessReceived').')';
|
||||
print ' :</td>';
|
||||
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($resteapayeraffiche) . '</td>';
|
||||
print '<td class="right'.($resteapayeraffiche?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">' . price($resteapayeraffiche) . '</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
}
|
||||
else // Credit note
|
||||
@ -4387,7 +4386,7 @@ elseif ($id > 0 || ! empty($ref))
|
||||
if ($resteapayeraffiche > 0)
|
||||
print ' ('.$langs->trans('ExcessPaid').')';
|
||||
print ' :</td>';
|
||||
print '<td class="right"'.($resteapayeraffiche?' class="amountremaintopayback"':(' class="'.$cssforamountpaymentcomplete.'"')).'>' . price($sign * $resteapayeraffiche) . '</td>';
|
||||
print '<td class="right'.($resteapayeraffiche?' amountremaintopayback':(' '.$cssforamountpaymentcomplete)).'">' . price($sign * $resteapayeraffiche) . '</td>';
|
||||
print '<td class="nowrap"> </td></tr>';
|
||||
|
||||
// Sold credit note
|
||||
|
||||
@ -675,7 +675,7 @@ class Facture extends CommonInvoice
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
@ -1081,7 +1081,7 @@ class Facture extends CommonInvoice
|
||||
*/
|
||||
public function createFromOrder($object, User $user)
|
||||
{
|
||||
global $hookmanager;
|
||||
global $conf, $hookmanager;
|
||||
|
||||
$error=0;
|
||||
|
||||
@ -1142,8 +1142,12 @@ class Facture extends CommonInvoice
|
||||
$this->fk_delivery_address = $object->fk_delivery_address;
|
||||
$this->contact_id = $object->contactid;
|
||||
$this->ref_client = $object->ref_client;
|
||||
$this->note_private = $object->note_private;
|
||||
$this->note_public = $object->note_public;
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN))
|
||||
{
|
||||
$this->note_private = $object->note_private;
|
||||
$this->note_public = $object->note_public;
|
||||
}
|
||||
|
||||
$this->module_source = $object->module_source;
|
||||
$this->pos_source = $object->pos_source;
|
||||
@ -1195,9 +1199,10 @@ class Facture extends CommonInvoice
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $addlinktonotes 1=Add link to notes
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param string $target Target of link ('', '_self', '_blank', '_parent', '_backoffice', ...)
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1)
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '')
|
||||
{
|
||||
global $langs, $conf, $user, $form;
|
||||
|
||||
@ -1250,7 +1255,7 @@ class Facture extends CommonInvoice
|
||||
if ($moretitle) $label.=' - '.$moretitle;
|
||||
}
|
||||
|
||||
$linkclose='';
|
||||
$linkclose=($target?' target="'.$target.'"':'');
|
||||
if (empty($notooltip) && $user->rights->facture->lire)
|
||||
{
|
||||
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
@ -2502,7 +2507,7 @@ class Facture extends CommonInvoice
|
||||
{
|
||||
$is_last = $next_invoice->is_last_in_cycle();
|
||||
|
||||
if ($next_invoice->brouillon && $is_last != 1)
|
||||
if ($next_invoice->statut == self::STATUS_DRAFT && $is_last != 1)
|
||||
{
|
||||
$this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref);
|
||||
return false;
|
||||
@ -2550,16 +2555,22 @@ class Facture extends CommonInvoice
|
||||
return 0;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture";
|
||||
$sql.= " SET fk_statut = ".self::STATUS_DRAFT;
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
||||
$result=$this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
if (! $error)
|
||||
{
|
||||
$this->oldcopy= clone $this;
|
||||
}
|
||||
|
||||
// Si on decremente le produit principal et ses composants a la validation de facture, on réincrement
|
||||
if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
{
|
||||
@ -2585,6 +2596,7 @@ class Facture extends CommonInvoice
|
||||
$old_statut=$this->statut;
|
||||
$this->brouillon = 1;
|
||||
$this->statut = self::STATUS_DRAFT;
|
||||
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('BILL_UNVALIDATE', $user);
|
||||
if ($result < 0)
|
||||
@ -2668,7 +2680,8 @@ class Facture extends CommonInvoice
|
||||
global $mysoc, $conf, $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::addline id=$this->id,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type, fk_unit=$fk_unit", LOG_DEBUG);
|
||||
if (! empty($this->brouillon))
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
@ -2709,6 +2722,12 @@ class Facture extends CommonInvoice
|
||||
// Check parameters
|
||||
if ($type < 0) return -1;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$product_type=$type;
|
||||
@ -2912,6 +2931,12 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
}
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// Clean parameters
|
||||
@ -4382,10 +4407,6 @@ class FactureLigne extends CommonInvoiceLine
|
||||
public $date_start;
|
||||
public $date_end;
|
||||
|
||||
// Ne plus utiliser
|
||||
//var $price; // P.U. HT apres remise % de ligne (exemple 80)
|
||||
//var $remise; // Montant calcule de la remise % sur PU HT (exemple 20)
|
||||
|
||||
// From llx_product
|
||||
/**
|
||||
* @deprecated
|
||||
|
||||
@ -165,7 +165,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
@ -1305,7 +1305,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditionsShort');
|
||||
print '</td>';
|
||||
if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
if ($action != 'editconditions' && $user->rights->facture->creer)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
@ -1329,7 +1329,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
if ($action != 'editmode' && $user->rights->facture->creer)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
@ -1392,7 +1392,7 @@ else
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('BankAccount');
|
||||
print '<td>';
|
||||
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||
if (($action != 'editbankaccount') && $user->rights->facture->creer && $object->statut == FactureRec::STATUS_DRAFT)
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
@ -1414,7 +1414,7 @@ else
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans('Model');
|
||||
print '<td>';
|
||||
if (($action != 'editmodelpdf') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||
if (($action != 'editmodelpdf') && $user->rights->facture->creer && $object->statut == FactureRec::STATUS_DRAFT)
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmodelpdf&id='.$object->id.'">'.img_edit($langs->trans('SetModel'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
@ -1463,7 +1463,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('Frequency');
|
||||
print '</td>';
|
||||
if ($action != 'editfrequency' && ! empty($object->brouillon) && $user->rights->facture->creer)
|
||||
if ($action != 'editfrequency' && $user->rights->facture->creer)
|
||||
print '<td class="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editfrequency&facid=' . $object->id . '">' . img_edit($langs->trans('Edit'), 1) . '</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
|
||||
@ -594,7 +594,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if($user->rights->facture->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewBill').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ $localtax_static = new Localtax($db);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt.'"><span class="valignmiddle">'.$langs->trans('NewLocalTaxPayment', ($ltt+1)).'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt.'"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewLocalTaxPayment', ($ltt+1)).'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->banque->cheque)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new"><span class="valignmiddle">'.$langs->trans('NewCheckDeposit').'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewCheckDeposit').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->prelevement->bons->creer)
|
||||
{
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php"><span class="valignmiddle">'.$langs->trans('NewStandingOrder').'</span>';
|
||||
$newcardbutton = '<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/prelevement/create.php"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewStandingOrder').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ if ($object->id)
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -150,7 +150,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if (! empty($user->rights->salaries->write))
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/salaries/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewSalaryPayment').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/salaries/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewSalaryPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ if ($id > 0)
|
||||
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||
|
||||
print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td class="right"'.($resteapayer?' class="amountremaintopay"':(' class="'.$cssforamountpaymentcomplete.'"')).'>'.price($resteapayer)."</td></tr>\n";
|
||||
print '<td class="right'.($resteapayer?' amountremaintopay':(' '.$cssforamountpaymentcomplete)).'">'.price($resteapayer)."</td></tr>\n";
|
||||
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
|
||||
@ -145,7 +145,7 @@ if ($object->id)
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
@ -152,7 +152,7 @@ if ($resql)
|
||||
$newcardbutton='';
|
||||
if($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/sociales/card.php?action=create">'.$langs->trans('MenuNewSocialContribution');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/sociales/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('MenuNewSocialContribution').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -131,7 +131,7 @@ if ($object->id)
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.dol_print_size($totalsize, 1, 1).'</td></tr>';
|
||||
|
||||
@ -150,7 +150,7 @@ if ($result)
|
||||
$newcardbutton='';
|
||||
if ($user->rights->tax->charges->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/tva/card.php?action=create">'.$langs->trans('NewVATPayment');
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/compta/tva/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewVATPayment').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ else
|
||||
{
|
||||
if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create))
|
||||
{
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'"><span class="valignmiddle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.='<a class="butActionNew" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddAction").'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ if ($object->id)
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
print '<table class="border tableforfield centpercent">';
|
||||
|
||||
// Company
|
||||
/*
|
||||
|
||||
@ -453,7 +453,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
$newcardbutton='';
|
||||
if ($user->rights->societe->contact->creer)
|
||||
{
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?action=create"><span class="valignmiddle">'.$langs->trans('NewContactAddress').'</span>';
|
||||
$newcardbutton='<a class="butActionNew" href="'.DOL_URL_ROOT.'/contact/card.php?action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans('NewContactAddress').'</span>';
|
||||
$newcardbutton.= '<span class="fa fa-plus-circle valignmiddle"></span>';
|
||||
$newcardbutton.= '</a>';
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
$desc=$prod->description;
|
||||
$desc=dol_concatdesc($desc, $product_desc, '', !empty($conf->global->CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
$desc=dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION));
|
||||
$fk_unit = $prod->fk_unit;
|
||||
}
|
||||
else
|
||||
@ -1212,7 +1212,7 @@ if ($action == 'create')
|
||||
{
|
||||
print '<td>';
|
||||
print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
@ -1254,7 +1254,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
$formproject->select_projects(($soc->id>0?$soc->id:-1), $projectid, "projectid", 0, 0, 1, 1);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . ' <span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -1374,7 +1374,6 @@ class Contrat extends CommonObject
|
||||
|
||||
if ($this->statut >= 0)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
// Clean parameters
|
||||
$pu_ht=price2num($pu_ht);
|
||||
@ -1394,7 +1393,7 @@ class Contrat extends CommonObject
|
||||
if (empty($txtva) || ! is_numeric($txtva)) $txtva=0;
|
||||
if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0;
|
||||
if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0;
|
||||
|
||||
|
||||
if ($price_base_type=='HT')
|
||||
{
|
||||
$pu=$pu_ht;
|
||||
@ -1406,6 +1405,14 @@ class Contrat extends CommonObject
|
||||
|
||||
// Check parameters
|
||||
if (empty($remise_percent)) $remise_percent=0;
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||
|
||||
@ -1596,6 +1603,12 @@ class Contrat extends CommonObject
|
||||
{
|
||||
$remise_percent=0;
|
||||
}
|
||||
|
||||
if ($date_start && $date_end && $date_start > $date_end) {
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorStartDateGreaterEnd');
|
||||
return -1;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $date_debut_reel, $date_fin_reel, $tvatx, $localtax1tx, $localtax2tx, $price_base_type, $info_bits");
|
||||
|
||||
|
||||
@ -204,7 +204,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
|
||||
// Ligne info remises tiers
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user