Merge branch 'develop' of https://github.com/dolibarr/dolibarr into develop
This commit is contained in:
commit
b296f62671
@ -65,21 +65,33 @@ $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
|
|||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql); $i = 0;
|
$num = $db->num_rows($resql); $i = 0;
|
||||||
while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
|
while ($i < $num) {
|
||||||
|
$row = $db->fetch_row($resql);
|
||||||
|
$productsid[$i] = $row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql); $i = 0;
|
$num = $db->num_rows($resql); $i = 0;
|
||||||
while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
|
while ($i < $num) {
|
||||||
|
$row = $db->fetch_row($resql);
|
||||||
|
$societesid[$i] = $row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
} else { print "err"; }
|
} else { print "err"; }
|
||||||
|
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num = $db->num_rows($resql); $i = 0;
|
$num = $db->num_rows($resql); $i = 0;
|
||||||
while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
|
while ($i < $num) {
|
||||||
|
$row = $db->fetch_row($resql);
|
||||||
|
$commandesid[$i] = $row[0];
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
} else { print "err"; }
|
} else { print "err"; }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -186,7 +186,7 @@
|
|||||||
<!-- Check indent are done with spaces and with correct number -->
|
<!-- Check indent are done with spaces and with correct number -->
|
||||||
<!-- Disabled as this does not support tab -->
|
<!-- Disabled as this does not support tab -->
|
||||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||||
<!-- TODO Enable this
|
|
||||||
<arg name="tab-width" value="4"/>
|
<arg name="tab-width" value="4"/>
|
||||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||||
<properties>
|
<properties>
|
||||||
@ -194,7 +194,7 @@
|
|||||||
<property name="tabIndent" value="true"/>
|
<property name="tabIndent" value="true"/>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
-->
|
|
||||||
|
|
||||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
|
||||||
|
|||||||
@ -178,7 +178,7 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
|||||||
$listofval = array(-1 => $langs->trans("Undefined"));
|
$listofval = array(-1 => $langs->trans("Undefined"));
|
||||||
$listofval += $adht->liste_array();
|
$listofval += $adht->liste_array();
|
||||||
$forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1;
|
$forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1;
|
||||||
print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listetype)>1?1:0);
|
print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listofval)>1?1:0);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
|
|||||||
@ -2180,6 +2180,10 @@ class Adherent extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|
||||||
|
$statusType = '';
|
||||||
|
$labelstatut = '';
|
||||||
|
$labelstatutShort = '';
|
||||||
|
|
||||||
if ($statut == -1)
|
if ($statut == -1)
|
||||||
{
|
{
|
||||||
$statusType = 'status0';
|
$statusType = 'status0';
|
||||||
|
|||||||
@ -140,6 +140,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
|
|||||||
{
|
{
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($listofsearchfields as $key => $value)
|
foreach($listofsearchfields as $key => $value)
|
||||||
@ -152,6 +153,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,7 +70,7 @@ function printBookmarksList()
|
|||||||
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
|
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
|
||||||
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
|
||||||
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'" ';
|
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'" ';
|
||||||
$ret.= ' data-html="'.dol_escape_htmltag('<span class="fa fa-star-o"></span> '.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...').'">';
|
$ret.= ' data-html="'.dol_escape_htmltag('<span class="fas fa-star"></span> '.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...').'">';
|
||||||
$ret.= dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
$ret.= dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
|
||||||
// Url to go on create new bookmark page
|
// Url to go on create new bookmark page
|
||||||
if (! empty($user->rights->bookmark->creer))
|
if (! empty($user->rights->bookmark->creer))
|
||||||
@ -78,7 +78,7 @@ function printBookmarksList()
|
|||||||
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
||||||
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
||||||
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_htmltag($urltoadd).'"';
|
$ret.= '<option value="newbookmark" class="optionblue" rel="'.dol_escape_htmltag($urltoadd).'"';
|
||||||
$ret.= ' data-html="'.dol_escape_htmltag('<span class="fa fa-star-o"></span> '.$langs->trans('AddThisPageToBookmarks').'...').'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks').'...').'</option>';
|
$ret.= ' data-html="'.dol_escape_htmltag('<span class="fas fa-star"></span> '.$langs->trans('AddThisPageToBookmarks').'...').'">'.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks').'...').'</option>';
|
||||||
}
|
}
|
||||||
// Menu with all bookmarks
|
// Menu with all bookmarks
|
||||||
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU))
|
||||||
@ -201,7 +201,7 @@ function printDropdownBookmarksList()
|
|||||||
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
//$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url);
|
||||||
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url);
|
||||||
$newbtn.= '<a class="top-menu-dropdown-link" title="'.$langs->trans('AddThisPageToBookmarks').'" href="'.dol_escape_htmltag($urltoadd).'" >';
|
$newbtn.= '<a class="top-menu-dropdown-link" title="'.$langs->trans('AddThisPageToBookmarks').'" href="'.dol_escape_htmltag($urltoadd).'" >';
|
||||||
$newbtn.= '<span class="fa fa-star-o"></span> '.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'</a>';
|
$newbtn.= '<span class="fas fa-star"></span> '.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,15 +68,18 @@ $langs->loadLangs(array("main","bills","cashdesk"));
|
|||||||
|
|
||||||
for ($i = 0; $i < $nbtoshow; $i++)
|
for ($i = 0; $i < $nbtoshow; $i++)
|
||||||
{
|
{
|
||||||
if ( $id == $tab_designations[$i]['rowid'] )
|
if ($id == $tab_designations[$i]['rowid']) {
|
||||||
$selected = 'selected';
|
$selected = 'selected';
|
||||||
else
|
} else {
|
||||||
$selected = '';
|
$selected = '';
|
||||||
|
}
|
||||||
|
|
||||||
$label = $tab_designations[$i]['label'];
|
$label = $tab_designations[$i]['label'];
|
||||||
|
|
||||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'], 16).' - '.dol_trunc($label, 35, 'middle');
|
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'], 16).' - '.dol_trunc($label, 35, 'middle');
|
||||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) {
|
||||||
|
print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
||||||
|
}
|
||||||
print '</option>'."\n";
|
print '</option>'."\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1582,8 +1582,9 @@ if ($id > 0)
|
|||||||
if ($user->rights->agenda->allactions->create ||
|
if ($user->rights->agenda->allactions->create ||
|
||||||
(($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))
|
(($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create))
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -1735,5 +1735,18 @@ function sort_events_by_date($a, $b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If both events have the same start time, longest first
|
// If both events have the same start time, longest first
|
||||||
|
|
||||||
|
if(! is_numeric($b->datef))
|
||||||
|
{
|
||||||
|
// when event B have no end timestamp, event B should sort be before event A (All day events on top)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! is_numeric($a->datef))
|
||||||
|
{
|
||||||
|
// when event A have no end timestamp , event A should sort be before event B (All day events on top)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
return $b->datef - $a->datef;
|
return $b->datef - $a->datef;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1325,17 +1325,17 @@ if (empty($reshook))
|
|||||||
$object->setProject(GETPOST('projectid', 'int'));
|
$object->setProject(GETPOST('projectid', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delai de livraison
|
// Delivery time
|
||||||
elseif ($action == 'setavailability' && $usercancreate) {
|
elseif ($action == 'setavailability' && $usercancreate) {
|
||||||
$result = $object->set_availability($user, GETPOST('availability_id', 'int'));
|
$result = $object->set_availability($user, GETPOST('availability_id', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Origine de la propale
|
// Origin of the commercial proposal
|
||||||
elseif ($action == 'setdemandreason' && $usercancreate) {
|
elseif ($action == 'setdemandreason' && $usercancreate) {
|
||||||
$result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int'));
|
$result = $object->set_demand_reason($user, GETPOST('demand_reason_id', 'int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conditions de reglement
|
// Terms of payment
|
||||||
elseif ($action == 'setconditions' && $usercancreate) {
|
elseif ($action == 'setconditions' && $usercancreate) {
|
||||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||||
}
|
}
|
||||||
@ -1348,7 +1348,7 @@ if (empty($reshook))
|
|||||||
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode de reglement
|
// Payment choice
|
||||||
elseif ($action == 'setmode' && $usercancreate) {
|
elseif ($action == 'setmode' && $usercancreate) {
|
||||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||||
}
|
}
|
||||||
@ -1413,7 +1413,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bascule du statut d'un contact
|
// Toggle the status of a contact
|
||||||
elseif ($action == 'swapstatut') {
|
elseif ($action == 'swapstatut') {
|
||||||
if ($object->fetch($id) > 0) {
|
if ($object->fetch($id) > 0) {
|
||||||
$result = $object->swapContactStatus(GETPOST('ligne'));
|
$result = $object->swapContactStatus(GETPOST('ligne'));
|
||||||
@ -1422,7 +1422,7 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Efface un contact
|
// Delete a contact
|
||||||
elseif ($action == 'deletecontact') {
|
elseif ($action == 'deletecontact') {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->delete_contact($lineid);
|
$result = $object->delete_contact($lineid);
|
||||||
@ -1600,7 +1600,7 @@ if ($action == 'create')
|
|||||||
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Ligne info remises tiers
|
// Third party discounts info line
|
||||||
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
print '<tr><td>' . $langs->trans('Discounts') . '</td><td>';
|
||||||
|
|
||||||
$absolute_discount = $soc->getAvailableDiscounts();
|
$absolute_discount = $soc->getAvailableDiscounts();
|
||||||
@ -1787,7 +1787,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Combobox pour la fonction de copie
|
* Combobox for copy function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) print '<input type="hidden" name="createmode" value="empty">';
|
if (empty($conf->global->PROPAL_CLONE_ON_CREATE_PAGE)) print '<input type="hidden" name="createmode" value="empty">';
|
||||||
@ -1884,7 +1884,7 @@ if ($action == 'create')
|
|||||||
if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY) && !empty($object->date_livraison)) {
|
if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY) && !empty($object->date_livraison)) {
|
||||||
$formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison);
|
$formquestion[] = array('type' => 'date','name' => 'date_delivery','label' => $langs->trans("DeliveryDate"),'value' => $object->date_livraison);
|
||||||
}
|
}
|
||||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
// Incomplete payment. We ask if reason = discount or other
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1927,7 +1927,7 @@ if ($action == 'create')
|
|||||||
elseif ($action == 'validate') {
|
elseif ($action == 'validate') {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// We verifie whether the object is provisionally numbering
|
// We verify whether the object is provisionally numbering
|
||||||
$ref = substr($object->ref, 1, 4);
|
$ref = substr($object->ref, 1, 4);
|
||||||
if ($ref == 'PROV') {
|
if ($ref == 'PROV') {
|
||||||
$numref = $object->getNextNumRef($soc);
|
$numref = $object->getNextNumRef($soc);
|
||||||
|
|||||||
@ -170,9 +170,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->propal->creer)
|
if ($user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -125,9 +125,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->propal->creer)
|
if ($user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -86,9 +86,10 @@ if (! empty($conf->projet->enabled))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->propal->creer)
|
if ($user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -280,8 +280,9 @@ $sql.= ' u.login';
|
|||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['label']))
|
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@ -101,9 +101,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->propal->creer)
|
if ($user->rights->propal->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a>';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -29,11 +29,8 @@ if (empty($conf) || ! is_object($conf)) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
@ -45,51 +42,46 @@ $langs->load("propal");
|
|||||||
|
|
||||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
print '<tr class="'.$trclass.'" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" >';
|
||||||
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
print '<td class="linkedcol-element" >'.$langs->trans("Proposal");
|
||||||
<td class="linkedcol-element" ><?php echo $langs->trans("Proposal"); ?>
|
|
||||||
<?php
|
|
||||||
if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES)
|
||||||
{
|
{
|
||||||
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$objectlink->id;
|
||||||
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
print '<a class="objectlinked_importbtn" href="'.$url.'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a>';
|
||||||
}
|
}
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
print '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
|
||||||
<td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
|
print '<td class="linkedcol-ref" >'.$objectlink->ref_client.'</td>';
|
||||||
<td class="linkedcol-ref" ><?php echo $objectlink->ref_client; ?></td>
|
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||||
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
print '<td class="linkedcol-amount right">';
|
||||||
<td class="linkedcol-amount right"><?php
|
|
||||||
if ($user->rights->propale->lire) {
|
if ($user->rights->propale->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
}
|
||||||
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
print '</td>';
|
||||||
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
|
||||||
</tr>
|
print '<td class="linkedcol-action right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||||
<?php
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
if (count($linkedObjectBlock) > 1)
|
if (count($linkedObjectBlock) > 1)
|
||||||
{
|
{
|
||||||
?>
|
print '<tr class="liste_total '.(empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':'').'">';
|
||||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
print '<td>'.$langs->trans("Total").'</td>';
|
||||||
<td><?php echo $langs->trans("Total"); ?></td>
|
print '<td></td>';
|
||||||
<td></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="right">'.price($total).'</td>';
|
||||||
<td class="right"><?php echo price($total); ?></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print "</tr>\n";
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -427,8 +427,9 @@ if ($id)
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' ';
|
$morehtmlref.=$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->banque->modifier)
|
if ($user->rights->banque->modifier)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -92,8 +92,9 @@ if ($object->id)
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' : ';
|
$morehtmlref.=$langs->trans('Project') . ' : ';
|
||||||
if ($user->rights->banque->modifier && 0)
|
if ($user->rights->banque->modifier && 0)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -61,8 +61,9 @@ if (! empty($conf->projet->enabled))
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' : ';
|
$morehtmlref.=$langs->trans('Project') . ' : ';
|
||||||
if ($user->rights->banque->modifier && 0)
|
if ($user->rights->banque->modifier && 0)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014-2019 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2019 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -815,7 +815,9 @@ if (empty($reshook))
|
|||||||
$sql .= " WHERE fk_facture = " . $object->id;
|
$sql .= " WHERE fk_facture = " . $object->id;
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (!empty($resql)) {
|
if (!empty($resql)) {
|
||||||
while ($obj = $db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc;
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
|
$total_creditnote_and_deposit += $obj->amount_ttc;
|
||||||
|
}
|
||||||
} else dol_print_error($db);
|
} else dol_print_error($db);
|
||||||
|
|
||||||
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
$discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $object->total_ttc;
|
||||||
@ -3274,11 +3276,11 @@ if ($action == 'create')
|
|||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php';
|
||||||
$liste = ModelePDFFactures::liste_modeles($db);
|
$liste = ModelePDFFactures::liste_modeles($db);
|
||||||
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)){ // Hidden conf
|
if(!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)){
|
||||||
|
// Hidden conf
|
||||||
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
$paramkey='FACTURE_ADDON_PDF_'.$object->type;
|
||||||
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
$curent = !empty($conf->global->$paramkey)?$conf->global->$paramkey:$conf->global->FACTURE_ADDON_PDF;
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$curent = $conf->global->FACTURE_ADDON_PDF;
|
$curent = $conf->global->FACTURE_ADDON_PDF;
|
||||||
}
|
}
|
||||||
print $form->selectarray('model', $liste, $curent);
|
print $form->selectarray('model', $liste, $curent);
|
||||||
@ -3803,8 +3805,9 @@ elseif ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($usercancreate)
|
if ($usercancreate)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -529,8 +529,7 @@ class Invoices extends DolibarrApi
|
|||||||
// update bank account
|
// update bank account
|
||||||
if (!empty($this->invoice->fk_account))
|
if (!empty($this->invoice->fk_account))
|
||||||
{
|
{
|
||||||
if($this->invoice->setBankAccount($this->invoice->fk_account) == 0)
|
if ($this->invoice->setBankAccount($this->invoice->fk_account) == 0) {
|
||||||
{
|
|
||||||
throw new RestException(400, $this->invoice->error);
|
throw new RestException(400, $this->invoice->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2587,10 +2587,12 @@ class Facture extends CommonInvoice
|
|||||||
$next_invoice->brouillon = 1;
|
$next_invoice->brouillon = 1;
|
||||||
foreach ($next_invoice->lines as $line)
|
foreach ($next_invoice->lines as $line)
|
||||||
{
|
{
|
||||||
$result = $next_invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent,
|
$result = $next_invoice->updateline(
|
||||||
|
$line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent,
|
||||||
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
$line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type,
|
||||||
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
$line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent,
|
||||||
$line->fk_unit);
|
$line->fk_unit
|
||||||
|
);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -163,9 +163,10 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -1242,8 +1242,9 @@ else
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -223,8 +223,9 @@ $sql.= " f.nb_gen_done, f.nb_gen_max, f.date_last_gen, f.date_when, f.suspended,
|
|||||||
$sql.= " f.datec, f.tms,";
|
$sql.= " f.datec, f.tms,";
|
||||||
$sql.= " f.fk_cond_reglement, f.fk_mode_reglement";
|
$sql.= " f.fk_cond_reglement, f.fk_mode_reglement";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['label']))
|
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
@ -632,8 +633,7 @@ if ($resql)
|
|||||||
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Status
|
// Status
|
||||||
if (! empty($arrayfields['status']['checked']))
|
if (! empty($arrayfields['status']['checked'])) {
|
||||||
{
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print $invoicerectmp->getLibStatut(3, 0);
|
print $invoicerectmp->getLibStatut(3, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -400,8 +400,9 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
|
|||||||
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
||||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (! empty($extrafields->attributes[$object->table_element]['label']))
|
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||||
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -1352,8 +1353,7 @@ if ($resql)
|
|||||||
|| isset($totalarray['totalttcfield'])
|
|| isset($totalarray['totalttcfield'])
|
||||||
|| isset($totalarray['totalamfield'])
|
|| isset($totalarray['totalamfield'])
|
||||||
|| isset($totalarray['totalrtpfield'])
|
|| isset($totalarray['totalrtpfield'])
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total">';
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $totalarray['nbfield'])
|
while ($i < $totalarray['nbfield'])
|
||||||
|
|||||||
@ -189,9 +189,10 @@ if ($object->id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->facture->creer)
|
if ($user->rights->facture->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
$morehtmlref.=' : ';
|
$morehtmlref.=' : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -233,8 +233,6 @@ foreach ($tmp_companies as $value) {
|
|||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
//if (empty($socid))
|
|
||||||
//{
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
@ -274,7 +272,6 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
//}
|
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|||||||
@ -24,11 +24,7 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -40,16 +36,16 @@ $langs->load("bills");
|
|||||||
|
|
||||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
print '<tr class="'.$trclass.'" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" >';
|
||||||
<tr class="<?php echo $trclass; ?>" data-element="<?php echo $objectlink->element; ?>" data-id="<?php echo $objectlink->id; ?>" >
|
print '<td class="linkedcol-element">';
|
||||||
<td class="linkedcol-element"><?php
|
|
||||||
switch ($objectlink->type) {
|
switch ($objectlink->type) {
|
||||||
case Facture::TYPE_REPLACEMENT:
|
case Facture::TYPE_REPLACEMENT:
|
||||||
echo $langs->trans("InvoiceReplacement");
|
echo $langs->trans("InvoiceReplacement");
|
||||||
@ -70,16 +66,16 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
echo $langs->trans("CustomerInvoice");
|
echo $langs->trans("CustomerInvoice");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?></td>
|
print '</td>';
|
||||||
<td class="linkedcol-name nowraponall"><?php echo $objectlink->getNomUrl(1); ?></td>
|
print '<td class="linkedcol-name nowraponall">'.$objectlink->getNomUrl(1).'</td>';
|
||||||
<td class="linkedcol-ref left"><?php echo $objectlink->ref_client; ?></td>
|
print '<td class="linkedcol-ref left">'.$objectlink->ref_client.'</td>';
|
||||||
<td class="linkedcol-date center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||||
<td class="linkedcol-amount right"><?php
|
print '<td class="linkedcol-amount right">';
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$sign = 1;
|
$sign = 1;
|
||||||
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = -1;
|
||||||
if ($objectlink->statut != 3) // If not abandonned
|
if ($objectlink->statut != 3) {
|
||||||
{
|
// If not abandonned
|
||||||
$total = $total + $sign * $objectlink->total_ht;
|
$total = $total + $sign * $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
}
|
}
|
||||||
@ -87,26 +83,23 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
{
|
{
|
||||||
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
echo '<strike>'.price($objectlink->total_ht).'</strike>';
|
||||||
}
|
}
|
||||||
} ?></td>
|
}
|
||||||
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
print '</td>';
|
||||||
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
|
||||||
</tr>
|
print '<td class="linkedcol-action right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||||
<?php
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
if (count($linkedObjectBlock) > 1)
|
if (count($linkedObjectBlock) > 1)
|
||||||
{
|
{
|
||||||
?>
|
print '<tr class="liste_total '.(empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':'').'">';
|
||||||
<tr class="liste_total <?php echo (empty($noMoreLinkedObjectBlockAfter)?'liste_sub_total':''); ?>">
|
print '<td>'.$langs->trans("Total").'</td>';
|
||||||
<td><?php echo $langs->trans("Total"); ?></td>
|
print '<td></td>';
|
||||||
<td></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="center"></td>';
|
||||||
<td class="center"></td>
|
print '<td class="right">'.price($total).'</td>';
|
||||||
<td class="right"><?php echo price($total); ?></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print '<td class="right"></td>';
|
||||||
<td class="right"></td>
|
print '</tr>';
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -24,11 +24,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -38,7 +36,8 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink)
|
foreach($linkedObjectBlock as $key => $objectlink)
|
||||||
{
|
{
|
||||||
$ilink++;
|
$ilink++;
|
||||||
@ -55,7 +54,8 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?></td>
|
}
|
||||||
|
?></td>
|
||||||
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
<td class="linkedcol-statut right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
||||||
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="linkedcol-action right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -75,6 +75,5 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -115,6 +115,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
|
|||||||
{
|
{
|
||||||
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
|
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder nohover centpercent">';
|
print '<table class="noborder nohover centpercent">';
|
||||||
$i=0;
|
$i=0;
|
||||||
foreach($listofsearchfields as $key => $value)
|
foreach($listofsearchfields as $key => $value)
|
||||||
@ -127,6 +128,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
@ -165,6 +167,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("CustomersDraftInvoices").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("CustomersDraftInvoices").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
@ -216,7 +219,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
{
|
{
|
||||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
|
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table></div><br>";
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -251,6 +254,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<th colspan="3">'.$langs->trans("SuppliersDraftInvoices").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
print '<th colspan="3">'.$langs->trans("SuppliersDraftInvoices").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||||
@ -303,7 +307,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
{
|
{
|
||||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
|
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table></div><br>";
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -320,8 +320,6 @@ else
|
|||||||
$span=$columns;
|
$span=$columns;
|
||||||
if ($modetax != 1) $span+=2;
|
if ($modetax != 1) $span+=2;
|
||||||
|
|
||||||
//if ($modetax == 0 || $modetax == 2)
|
|
||||||
//{
|
|
||||||
// Customers invoices
|
// Customers invoices
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td class="left">'.$elementcust.'</td>';
|
print '<td class="left">'.$elementcust.'</td>';
|
||||||
@ -481,9 +479,7 @@ else
|
|||||||
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
print '<tr><td colspan="'.($span+1).'"> </td></tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
$diff=$x_coll_sum;
|
$diff=$x_coll_sum;
|
||||||
//}
|
|
||||||
|
|
||||||
//if($conf->global->$calc ==0 || $conf->global->$calc == 1){
|
|
||||||
echo '<table class="noborder" width="100%">';
|
echo '<table class="noborder" width="100%">';
|
||||||
//print table headers for this quadri - expenses now
|
//print table headers for this quadri - expenses now
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -636,7 +632,6 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
//}
|
|
||||||
|
|
||||||
// Total to pay
|
// Total to pay
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|||||||
@ -1894,8 +1894,8 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ADDRESS.'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.'</AdrLine>'.$CrLf;
|
$XML_SEPA_INFO .= ' <AdrLine>'.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.'</AdrLine>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </PstlAdr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;
|
$XML_SEPA_INFO .= ' </UltmtCdtr>'.$CrLf;*/
|
||||||
*/ $XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
$XML_SEPA_INFO .= ' <ChrgBr>SLEV</ChrgBr>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
$XML_SEPA_INFO .= ' <CdtrSchmeId>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
$XML_SEPA_INFO .= ' <Id>'.$CrLf;
|
||||||
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
$XML_SEPA_INFO .= ' <PrvtId>'.$CrLf;
|
||||||
|
|||||||
@ -749,17 +749,17 @@ if (! empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modeco
|
|||||||
$sql.= " AND fk_statut in (1,2)";
|
$sql.= " AND fk_statut in (1,2)";
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||||
}
|
} elseif ($modecompta == 'RECETTES-DEPENSES') {
|
||||||
elseif ($modecompta == 'RECETTES-DEPENSES') {
|
|
||||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id";
|
||||||
$sql.= " WHERE p.entity IN (".getEntity('donation').")";
|
$sql.= " WHERE p.entity IN (".getEntity('donation').")";
|
||||||
$sql.= " AND fk_statut >= 2";
|
$sql.= " AND fk_statut >= 2";
|
||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end)) {
|
||||||
$sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND pe.datep >= '".$db->idate($date_start)."' AND pe.datep <= '".$db->idate($date_end)."'";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||||
|
|
||||||
|
|||||||
@ -454,8 +454,9 @@ if ($id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->tax->charges->creer)
|
if ($user->rights->tax->charges->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -241,15 +241,13 @@ if (! empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES') {
|
||||||
{
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td width="6%" class="right">' . $langs->trans("TurnoverbyVatrate") . '</td>';
|
print '<tr class="liste_titre"><td width="6%" class="right">' . $langs->trans("TurnoverbyVatrate") . '</td>';
|
||||||
print '<td class="left">' . $langs->trans("ProductOrService") . '</td>';
|
print '<td class="left">' . $langs->trans("ProductOrService") . '</td>';
|
||||||
print '<td class="left">' . $langs->trans("Country") . '</td>';
|
print '<td class="left">' . $langs->trans("Country") . '</td>';
|
||||||
$i=0;
|
$i=0;
|
||||||
while($i < 12)
|
while($i < 12) {
|
||||||
{
|
|
||||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||||
if ($j > 12) $j -= 12;
|
if ($j > 12) $j -= 12;
|
||||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||||
|
|||||||
@ -135,13 +135,15 @@ echo $this->control->tpl['ajax_selectcountry'];
|
|||||||
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (! empty($this->control->tpl['contact_element'])) { ?>
|
<?php
|
||||||
<?php foreach ($this->control->tpl['contact_element'] as $element) { ?>
|
if (! empty($this->control->tpl['contact_element'])) {
|
||||||
<tr>
|
foreach ($this->control->tpl['contact_element'] as $element) {
|
||||||
<td><?php echo $element['linked_element_label']; ?></td>
|
print '<tr>';
|
||||||
<td colspan="3"><?php echo $element['linked_element_value']; ?></td>
|
print '<td>'.$element['linked_element_label'].'</td>';
|
||||||
</tr>
|
print '<td colspan="3">'.$element['linked_element_value'].'</td>';
|
||||||
<?php } } ?>
|
print '</tr>';
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $langs->trans("DolibarrLogin"); ?></td>
|
<td><?php echo $langs->trans("DolibarrLogin"); ?></td>
|
||||||
|
|||||||
@ -24,17 +24,14 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
|
|
||||||
|
|
||||||
$contact = $GLOBALS['objcanvas']->control->object;
|
$contact = $GLOBALS['objcanvas']->control->object;
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->
|
print "<!-- BEGIN PHP TEMPLATE CONTACTCARD_VIEW.TPL.PHP DEFAULT -->\n";
|
||||||
<?php echo $this->control->tpl['showhead']; ?>
|
echo $this->control->tpl['showhead'];
|
||||||
|
|
||||||
<?php
|
|
||||||
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
||||||
?>
|
|
||||||
|
|
||||||
<?php if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?>
|
if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user'];
|
||||||
<?php if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
||||||
|
|
||||||
<table class="border allwidth">
|
<table class="border allwidth">
|
||||||
|
|
||||||
@ -134,29 +131,27 @@ dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors'
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php echo $this->control->tpl['showend']; ?>
|
<?php echo $this->control->tpl['showend'];
|
||||||
|
|
||||||
<?php if (empty($user->societe_id)) { ?>
|
if (empty($user->societe_id)) {
|
||||||
<div class="tabsAction">
|
print '<div class="tabsAction">';
|
||||||
|
if ($user->rights->societe->contact->creer) {
|
||||||
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
<?php if ($user->rights->societe->contact->creer) { ?>
|
if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
||||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas; ?>"><?php echo $langs->trans('Modify'); ?></a>
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||||
<?php } ?>
|
}
|
||||||
|
|
||||||
<?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
|
if ($user->rights->societe->contact->supprimer) {
|
||||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas; ?>"><?php echo $langs->trans("CreateDolibarrLogin"); ?></a>
|
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
||||||
<?php } ?>
|
}
|
||||||
|
|
||||||
<?php if ($user->rights->societe->contact->supprimer) { ?>
|
print '</div><br>';
|
||||||
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
}
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
</div><br>
|
|
||||||
<?php }
|
|
||||||
|
|
||||||
echo $this->control->tpl['actionstodo'];
|
echo $this->control->tpl['actionstodo'];
|
||||||
|
|
||||||
echo $this->control->tpl['actionsdone'];
|
echo $this->control->tpl['actionsdone'];
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -972,7 +972,7 @@ else
|
|||||||
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
print '<tr><td><label for="state_id">'.$langs->trans('State').'</label></td><td colspan="3" class="maxwidthonsmartphone">';
|
||||||
}
|
}
|
||||||
|
|
||||||
print $formcompany->select_state($object->state_id, isset($_POST["country_id"])?GETPOST("country_id"):$object->country_id, 'state_id');
|
print $formcompany->select_state(GETPOSTISSET('state_id')?GETPOST('state_id', 'alpha'):$object->state_id, $object->country_code, 'state_id');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -164,8 +164,9 @@ if ($id > 0)
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->contrat->creer)
|
if ($user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -331,9 +331,8 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$array_options = array();
|
$array_options = array();
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) // For avoid conflicts if
|
// For avoid conflicts if trigger used
|
||||||
// trigger used
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
|
||||||
{
|
|
||||||
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
$lines[$i]->fetch_optionals($lines[$i]->rowid);
|
||||||
$array_options = $lines[$i]->array_options;
|
$array_options = $lines[$i]->array_options;
|
||||||
}
|
}
|
||||||
@ -1419,8 +1418,9 @@ else
|
|||||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->contrat->creer)
|
if ($user->rights->contrat->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2015-2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2015-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -706,8 +706,9 @@ while ($i < min($num, $limit))
|
|||||||
if (! empty($arrayfields['status']['checked']))
|
if (! empty($arrayfields['status']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
if ($obj->cstatut == 0) // If contract is draft, we say line is also draft
|
if ($obj->cstatut == 0)
|
||||||
{
|
{
|
||||||
|
// If contract is draft, we say line is also draft
|
||||||
print $contractstatic->LibStatut(0, 5);
|
print $contractstatic->LibStatut(0, 5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -23,11 +23,9 @@ if (empty($conf) || ! is_object($conf))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -65,8 +63,9 @@ foreach($linkedObjectBlock as $key => $objectlink)
|
|||||||
echo price($totalcontrat);
|
echo price($totalcontrat);
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td class="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
<td class="right"><?php echo $objectlink->getLibStatut(7); ?></td>
|
||||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -82,8 +82,8 @@ elseif (GETPOST('linkit', 'none') && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
$urlfile = GETPOST('urlfile', 'alpha', 0, null, null, 1); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
|
||||||
if (GETPOST('section', 'alpha')) // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
|
if (GETPOST('section', 'alpha')) {
|
||||||
{
|
// For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir
|
||||||
$file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile;
|
$file = $upload_dir . (preg_match('/\/$/', $upload_dir) ? '' : '/') . $urlfile;
|
||||||
}
|
}
|
||||||
else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
|
else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile.
|
||||||
@ -94,8 +94,8 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
$linkid = GETPOST('linkid', 'int');
|
$linkid = GETPOST('linkid', 'int');
|
||||||
|
|
||||||
if ($urlfile) // delete of a file
|
if ($urlfile) {
|
||||||
{
|
// delete of a file
|
||||||
$dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine
|
$dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine
|
||||||
$dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image)
|
$dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette (if file is an image)
|
||||||
|
|
||||||
@ -118,8 +118,11 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ret) setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs');
|
if ($ret) {
|
||||||
else setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors');
|
setEventMessages($langs->trans("FileWasRemoved", $urlfile), null, 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($linkid) // delete of external link
|
elseif ($linkid) // delete of external link
|
||||||
{
|
{
|
||||||
@ -140,10 +143,8 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($object) && $object->id > 0)
|
if (is_object($object) && $object->id > 0) {
|
||||||
{
|
if ($backtopage) {
|
||||||
if ($backtopage)
|
|
||||||
{
|
|
||||||
header('Location: ' . $backtopage);
|
header('Location: ' . $backtopage);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
* Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
|
||||||
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2017-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
* Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -4631,7 +4631,9 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search template files
|
// Search template files
|
||||||
$file=''; $classname=''; $filefound=0;
|
$file='';
|
||||||
|
$classname='';
|
||||||
|
$filefound=0;
|
||||||
$dirmodels=array('/');
|
$dirmodels=array('/');
|
||||||
if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']);
|
if (is_array($conf->modules_parts['models'])) $dirmodels=array_merge($dirmodels, $conf->modules_parts['models']);
|
||||||
foreach($dirmodels as $reldir)
|
foreach($dirmodels as $reldir)
|
||||||
@ -4771,8 +4773,7 @@ abstract class CommonObject
|
|||||||
$setsharekey=true;
|
$setsharekey=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($setsharekey)
|
if ($setsharekey) {
|
||||||
{
|
|
||||||
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
if (empty($ecmfile->share)) // Because object not found or share not set yet
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
@ -4788,8 +4789,7 @@ abstract class CommonObject
|
|||||||
$ecmfile->description = ''; // indexed content
|
$ecmfile->description = ''; // indexed content
|
||||||
$ecmfile->keyword = ''; // keyword content
|
$ecmfile->keyword = ''; // keyword content
|
||||||
$result = $ecmfile->update($user);
|
$result = $ecmfile->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4807,8 +4807,7 @@ abstract class CommonObject
|
|||||||
$ecmfile->src_object_id = $this->id;
|
$ecmfile->src_object_id = $this->id;
|
||||||
|
|
||||||
$result = $ecmfile->create($user);
|
$result = $ecmfile->create($user);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4827,9 +4826,9 @@ abstract class CommonObject
|
|||||||
$sql.= ' WHERE rowid = '.$this->id;
|
$sql.= ' WHERE rowid = '.$this->id;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) dol_print_error($this->db);
|
if (! $resql) {
|
||||||
else
|
dol_print_error($this->db);
|
||||||
{
|
} else {
|
||||||
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
$this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6063,8 +6062,9 @@ abstract class CommonObject
|
|||||||
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
|
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (empty($labeltoshow))
|
if (empty($labeltoshow)) {
|
||||||
$labeltoshow = '(not defined)';
|
$labeltoshow = '(not defined)';
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
|
||||||
$data[$obj->rowid]=$labeltoshow;
|
$data[$obj->rowid]=$labeltoshow;
|
||||||
|
|||||||
@ -76,10 +76,9 @@ class FormContract
|
|||||||
if ($socid > 0)
|
if ($socid > 0)
|
||||||
{
|
{
|
||||||
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
|
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
|
||||||
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
|
if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) {
|
||||||
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
|
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
|
||||||
elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all')
|
} elseif ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') {
|
||||||
{
|
|
||||||
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
|
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
|
||||||
$sql.= " OR c.fk_soc IS NULL)";
|
$sql.= " OR c.fk_soc IS NULL)";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,9 +41,21 @@ class FormMail extends Form
|
|||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
public $withform; // 1=Include HTML form tag and show submit button, 0=Do not include form tag and submit button, -1=Do not include form tag but include submit button
|
/**
|
||||||
|
* @var int 1 = Include HTML form tag and show submit button
|
||||||
|
* 0 = Do not include form tag and submit button
|
||||||
|
* -1 = Do not include form tag but include submit button
|
||||||
|
*/
|
||||||
|
public $withform;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string name from
|
||||||
|
*/
|
||||||
public $fromname;
|
public $fromname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string email from
|
||||||
|
*/
|
||||||
public $frommail;
|
public $frommail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,10 +64,15 @@ class FormMail extends Form
|
|||||||
public $fromtype;
|
public $fromtype;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int from ID
|
||||||
*/
|
*/
|
||||||
public $fromid;
|
public $fromid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int also from robot
|
||||||
|
*/
|
||||||
|
public $fromalsorobot;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string thirdparty etc
|
* @var string thirdparty etc
|
||||||
*/
|
*/
|
||||||
@ -66,10 +83,29 @@ class FormMail extends Form
|
|||||||
*/
|
*/
|
||||||
public $toid;
|
public $toid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string replyto name
|
||||||
|
*/
|
||||||
public $replytoname;
|
public $replytoname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string replyto email
|
||||||
|
*/
|
||||||
public $replytomail;
|
public $replytomail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string to name
|
||||||
|
*/
|
||||||
public $toname;
|
public $toname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string to email
|
||||||
|
*/
|
||||||
public $tomail;
|
public $tomail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string trackid
|
||||||
|
*/
|
||||||
public $trackid;
|
public $trackid;
|
||||||
|
|
||||||
public $withsubstit; // Show substitution array
|
public $withsubstit; // Show substitution array
|
||||||
|
|||||||
@ -139,8 +139,7 @@ class Menubase
|
|||||||
{
|
{
|
||||||
$sql = "SELECT MAX(rowid) as maxrowid FROM ".MAIN_DB_PREFIX."menu";
|
$sql = "SELECT MAX(rowid) as maxrowid FROM ".MAIN_DB_PREFIX."menu";
|
||||||
$resqlrowid=$this->db->query($sql);
|
$resqlrowid=$this->db->query($sql);
|
||||||
if ($resqlrowid)
|
if ($resqlrowid) {
|
||||||
{
|
|
||||||
$obj=$this->db->fetch_object($resqlrowid);
|
$obj=$this->db->fetch_object($resqlrowid);
|
||||||
$maxrowid=$obj->maxrowid;
|
$maxrowid=$obj->maxrowid;
|
||||||
|
|
||||||
|
|||||||
@ -220,8 +220,7 @@ class DoliDBMssql extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function close()
|
public function close()
|
||||||
{
|
{
|
||||||
if ($this->db)
|
if ($this->db) {
|
||||||
{
|
|
||||||
if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened, LOG_ERR);
|
if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened, LOG_ERR);
|
||||||
$this->connected=false;
|
$this->connected=false;
|
||||||
return mssql_close($this->db);
|
return mssql_close($this->db);
|
||||||
|
|||||||
@ -1135,13 +1135,16 @@ class DoliDBPgsql extends DoliDB
|
|||||||
$sql .= " ".$field_desc['attribute'];
|
$sql .= " ".$field_desc['attribute'];
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['null']))
|
if (preg_match("/^[^\s]/i", $field_desc['null']))
|
||||||
$sql .= " ".$field_desc['null'];
|
$sql .= " ".$field_desc['null'];
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['default']))
|
if (preg_match("/^[^\s]/i", $field_desc['default'])) {
|
||||||
if (preg_match("/null/i", $field_desc['default']))
|
if (preg_match("/null/i", $field_desc['default'])) {
|
||||||
$sql .= " default ".$field_desc['default'];
|
$sql .= " default ".$field_desc['default'];
|
||||||
else
|
} else {
|
||||||
$sql .= " default '".$field_desc['default']."'";
|
$sql .= " default '".$field_desc['default']."'";
|
||||||
if (preg_match("/^[^\s]/i", $field_desc['extra']))
|
}
|
||||||
|
}
|
||||||
|
if (preg_match("/^[^\s]/i", $field_desc['extra'])) {
|
||||||
$sql .= " ".$field_desc['extra'];
|
$sql .= " ".$field_desc['extra'];
|
||||||
|
}
|
||||||
$sql .= " ".$field_position;
|
$sql .= " ".$field_position;
|
||||||
|
|
||||||
dol_syslog($sql, LOG_DEBUG);
|
dol_syslog($sql, LOG_DEBUG);
|
||||||
|
|||||||
@ -237,6 +237,7 @@ function show_array_actions_to_do($max = 5)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastActionsToDo", $max).'</th>';
|
||||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=todo">'.$langs->trans("FullList").'</a></th>';
|
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=todo">'.$langs->trans("FullList").'</a></th>';
|
||||||
@ -292,7 +293,7 @@ function show_array_actions_to_do($max = 5)
|
|||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table></div><br>";
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
@ -334,6 +335,7 @@ function show_array_last_actions_done($max = 5)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
|
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("LastDoneTasks", $max).'</th>';
|
||||||
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=done">'.$langs->trans("FullList").'</a></th>';
|
print '<th colspan="2" class="right"><a class="commonlink" href="'.DOL_URL_ROOT.'/comm/action/list.php?status=done">'.$langs->trans("FullList").'</a></th>';
|
||||||
@ -380,7 +382,7 @@ function show_array_last_actions_done($max = 5)
|
|||||||
}
|
}
|
||||||
// TODO Ajouter rappel pour "il y a des contrats a mettre en service"
|
// TODO Ajouter rappel pour "il y a des contrats a mettre en service"
|
||||||
// TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
|
// TODO Ajouter rappel pour "il y a des contrats qui arrivent a expiration"
|
||||||
print "</table><br>";
|
print "</table></div><br>";
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -313,8 +313,14 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
{
|
{
|
||||||
if (empty($user->rights->$feature->$subfeature->creer)
|
if (empty($user->rights->$feature->$subfeature->creer)
|
||||||
&& empty($user->rights->$feature->$subfeature->write)
|
&& empty($user->rights->$feature->$subfeature->write)
|
||||||
&& empty($user->rights->$feature->$subfeature->create)) { $createok=0; $nbko++; }
|
&& empty($user->rights->$feature->$subfeature->create)) {
|
||||||
else { $createok=1; break; } // Break to bypass second test if the first is ok
|
$createok=0;
|
||||||
|
$nbko++;
|
||||||
|
} else {
|
||||||
|
$createok=1;
|
||||||
|
// Break to bypass second test if the first is ok
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (! empty($feature)) // This is for permissions on 2 levels ('creer' or 'write')
|
elseif (! empty($feature)) // This is for permissions on 2 levels ('creer' or 'write')
|
||||||
@ -322,7 +328,10 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f
|
|||||||
//print '<br>feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write;
|
//print '<br>feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write;
|
||||||
if (empty($user->rights->$feature->creer)
|
if (empty($user->rights->$feature->creer)
|
||||||
&& empty($user->rights->$feature->write)
|
&& empty($user->rights->$feature->write)
|
||||||
&& empty($user->rights->$feature->create)) { $createok=0; $nbko++; }
|
&& empty($user->rights->$feature->create)) {
|
||||||
|
$createok=0;
|
||||||
|
$nbko++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -723,10 +723,8 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
|||||||
$out.="</span>\n";
|
$out.="</span>\n";
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
|
|
||||||
$out.='<h3 class="timeline-header">';
|
$out.='<h3 class="timeline-header">';
|
||||||
|
|
||||||
|
|
||||||
// Author of event
|
// Author of event
|
||||||
$out.='<span class="messaging-author">';
|
$out.='<span class="messaging-author">';
|
||||||
if ($histo[$key]['userid'] > 0)
|
if ($histo[$key]['userid'] > 0)
|
||||||
@ -739,11 +737,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
|
|||||||
}
|
}
|
||||||
$out.='</span>';
|
$out.='</span>';
|
||||||
|
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
$out .= ' <span class="messaging-title">';
|
$out .= ' <span class="messaging-title">';
|
||||||
|
|
||||||
|
|
||||||
if($actionstatic->code == 'TICKET_MSG') {
|
if($actionstatic->code == 'TICKET_MSG') {
|
||||||
$out .= $langs->trans('TicketNewMessage');
|
$out .= $langs->trans('TicketNewMessage');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -240,7 +240,6 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('main', 'other', 'errors'));
|
$langs->loadLangs(array('main', 'other', 'errors'));
|
||||||
;
|
|
||||||
$_SESSION["dol_loginmesg"]=($ldap->error?$ldap->error:$langs->trans("ErrorBadLoginPassword"));
|
$_SESSION["dol_loginmesg"]=($ldap->error?$ldap->error:$langs->trans("ErrorBadLoginPassword"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -307,10 +307,12 @@ class MenuManager
|
|||||||
print $val2['titre'];
|
print $val2['titre'];
|
||||||
if ($relurl2)
|
if ($relurl2)
|
||||||
{
|
{
|
||||||
if ($val2['enabled']) // Allowed
|
if ($val2['enabled']) {
|
||||||
|
// Allowed
|
||||||
print '</a>';
|
print '</a>';
|
||||||
else
|
} else {
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</li>'."\n";
|
print '</li>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,10 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Automatic Numbering
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
public $searchcode; // Search string
|
public $searchcode; // Search string
|
||||||
|
|
||||||
|
|||||||
@ -952,8 +952,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1107,7 +1107,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
if ($tvakey!=0) // On affiche pas taux 0
|
if ($tvakey!=0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
@ -1139,8 +1138,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
|
|||||||
@ -53,6 +53,9 @@ class mod_contract_magre extends ModelNumRefContracts
|
|||||||
*/
|
*/
|
||||||
public $name='Magre';
|
public $name='Magre';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
public $code_auto=1;
|
public $code_auto=1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -58,7 +58,10 @@ class mod_contract_olive extends ModelNumRefContracts
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto = 0; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -53,6 +53,9 @@ class mod_contract_serpis extends ModelNumRefContracts
|
|||||||
*/
|
*/
|
||||||
public $name='Serpis';
|
public $name='Serpis';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
public $code_auto=1;
|
public $code_auto=1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -324,8 +324,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
if ($unite[$i]==1) {
|
if ($unite[$i]==1) {
|
||||||
$secon[$i]='vingt et';
|
$secon[$i]='vingt et';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$secon[$i]='vingt';
|
$secon[$i]='vingt';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
}
|
||||||
@ -334,8 +333,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
if ($unite[$i]==1) {
|
if ($unite[$i]==1) {
|
||||||
$secon[$i]='trente et';
|
$secon[$i]='trente et';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$secon[$i]='trente';
|
$secon[$i]='trente';
|
||||||
$prim[$i]=$chif[$unite[$i]];
|
$prim[$i]=$chif[$unite[$i]];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -218,10 +218,9 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
|
|
||||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
|
||||||
{
|
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) {
|
||||||
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
// If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
||||||
{
|
|
||||||
if ($obj['photo_vignette'])
|
if ($obj['photo_vignette'])
|
||||||
{
|
{
|
||||||
$filename= $obj['photo_vignette'];
|
$filename= $obj['photo_vignette'];
|
||||||
|
|||||||
@ -139,19 +139,19 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if($db->num_rows($result) > 0):
|
if ($db->num_rows($result) > 0) {
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$newref = $objp->max;
|
$newref = $objp->max;
|
||||||
$newref++;
|
$newref++;
|
||||||
while(strlen($newref) < $num_car):
|
while (strlen($newref) < $num_car) {
|
||||||
$newref = "0".$newref;
|
$newref = "0".$newref;
|
||||||
endwhile;
|
}
|
||||||
else:
|
} else {
|
||||||
$newref = 1;
|
$newref = 1;
|
||||||
while(strlen($newref) < $num_car):
|
while (strlen($newref) < $num_car) {
|
||||||
$newref = "0".$newref;
|
$newref = "0".$newref;
|
||||||
endwhile;
|
}
|
||||||
endif;
|
}
|
||||||
|
|
||||||
$ref_number_int = ($newref+1)-1;
|
$ref_number_int = ($newref+1)-1;
|
||||||
|
|
||||||
|
|||||||
@ -1271,8 +1271,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//Local tax 1 after VAT
|
//Local tax 1 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
foreach($this->localtax1 as $localtax_type => $localtax_rate)
|
foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
|
||||||
{
|
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach($localtax_rate as $tvakey => $tvaval)
|
foreach($localtax_rate as $tvakey => $tvaval)
|
||||||
|
|||||||
@ -769,10 +769,12 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type && $localtax1ligne != 0)
|
if ($localtax1_type && $localtax1ligne != 0) {
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||||
if ($localtax2_type && $localtax2ligne != 0)
|
}
|
||||||
|
if ($localtax2_type && $localtax2ligne != 0) {
|
||||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
}
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0;
|
if (! isset($this->tva[$vatrate])) $this->tva[$vatrate]=0;
|
||||||
@ -781,8 +783,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$nexY = max($nexY, $posYAfterImage);
|
$nexY = max($nexY, $posYAfterImage);
|
||||||
|
|
||||||
// Add line
|
// Add line
|
||||||
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
|
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) {
|
||||||
{
|
|
||||||
$pdf->setPage($pageposafter);
|
$pdf->setPage($pageposafter);
|
||||||
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80)));
|
||||||
//$pdf->SetDrawColor(190,190,200);
|
//$pdf->SetDrawColor(190,190,200);
|
||||||
@ -793,11 +794,9 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$nexY+=2; // Add space between lines
|
$nexY+=2; // Add space between lines
|
||||||
|
|
||||||
// Detect if some page were added automatically and output _tableau for past pages
|
// Detect if some page were added automatically and output _tableau for past pages
|
||||||
while ($pagenb < $pageposafter)
|
while ($pagenb < $pageposafter) {
|
||||||
{
|
|
||||||
$pdf->setPage($pagenb);
|
$pdf->setPage($pagenb);
|
||||||
if ($pagenb == $pageposbeforeprintlines)
|
if ($pagenb == $pageposbeforeprintlines) {
|
||||||
{
|
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -811,10 +810,8 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
|
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak) {
|
||||||
{
|
if ($pagenb == $pageposafter) {
|
||||||
if ($pagenb == $pageposafter)
|
|
||||||
{
|
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1270,9 +1267,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->setY($tab2_top);
|
$pdf->setY($tab2_top);
|
||||||
$posy = $pdf->GetY();
|
$posy = $pdf->GetY();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($TPreviousIncoice as &$fac) {
|
foreach ($TPreviousIncoice as &$fac) {
|
||||||
if($posy > $this->page_hauteur - 4 ) {
|
if($posy > $this->page_hauteur - 4 ) {
|
||||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||||
@ -1453,8 +1447,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
|
|
||||||
@ -1473,7 +1465,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
|
|||||||
@ -53,6 +53,9 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
|||||||
*/
|
*/
|
||||||
public $name='Immaculate';
|
public $name='Immaculate';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
public $code_auto=1;
|
public $code_auto=1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -54,6 +54,9 @@ class mod_holiday_madonna extends ModelNumRefHolidays
|
|||||||
*/
|
*/
|
||||||
public $name='Madonna';
|
public $name='Madonna';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
public $code_auto=1;
|
public $code_auto=1;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -255,7 +255,9 @@ class mailing_fraise extends MailingTargets
|
|||||||
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
|
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$this->db->escape($mailing_id).")";
|
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$this->db->escape($mailing_id).")";
|
||||||
// Filter on status
|
// Filter on status
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') {
|
||||||
|
$sql.= " AND a.statut=-1";
|
||||||
|
}
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND (a.datefin >= '".$this->db->idate($now)."' OR ta.subscription = 0)";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND (a.datefin >= '".$this->db->idate($now)."' OR ta.subscription = 0)";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '1b') $sql.= " AND a.statut=1 AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND ta.subscription = 1)";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '1b') $sql.= " AND a.statut=1 AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND ta.subscription = 1)";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
||||||
|
|||||||
@ -291,8 +291,7 @@ class mailing_thirdparties extends MailingTargets
|
|||||||
$s.= $langs->trans('ProspectCustomer');
|
$s.= $langs->trans('ProspectCustomer');
|
||||||
$s.=': <select name="filter_client" class="flat">';
|
$s.=': <select name="filter_client" class="flat">';
|
||||||
$s.= '<option value="-1"> </option>';
|
$s.= '<option value="-1"> </option>';
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||||
{
|
|
||||||
$s.= '<option value="2">'.$langs->trans('Prospect').'</option>';
|
$s.= '<option value="2">'.$langs->trans('Prospect').'</option>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) {
|
||||||
|
|||||||
@ -72,7 +72,8 @@ class modComptabilite extends DolibarrModules
|
|||||||
$this->const = array();
|
$this->const = array();
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/comptabilite/temp",
|
$this->dirs = array(
|
||||||
|
"/comptabilite/temp",
|
||||||
"/comptabilite/rapport",
|
"/comptabilite/rapport",
|
||||||
"/comptabilite/export",
|
"/comptabilite/export",
|
||||||
"/comptabilite/bordereau"
|
"/comptabilite/bordereau"
|
||||||
|
|||||||
@ -298,8 +298,7 @@ class modExpedition extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd';
|
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object';
|
||||||
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT))
|
if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) {
|
||||||
{
|
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
||||||
|
|||||||
@ -223,8 +223,7 @@ class modReception extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch_extrafields as extra2 ON ed.rowid = extra2.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch_extrafields as extra2 ON ed.rowid = extra2.fk_object';
|
||||||
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid';
|
||||||
if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT))
|
if ($idcontacts && ! empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) {
|
||||||
{
|
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople as sp ON sp.rowid = ee.fk_socpeople';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'socpeople_extrafields as extra3 ON sp.rowid = extra3.fk_object';
|
||||||
|
|||||||
@ -82,8 +82,8 @@ class modStripe extends DolibarrModules
|
|||||||
// New pages on tabs
|
// New pages on tabs
|
||||||
$this->tabs = array();
|
$this->tabs = array();
|
||||||
|
|
||||||
// Boxes
|
// List of boxes
|
||||||
$this->boxes = array(); // List of boxes
|
$this->boxes = array();
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
|
|||||||
@ -185,14 +185,12 @@ class modWebsite extends DolibarrModules
|
|||||||
dol_mkdir($destroot);
|
dol_mkdir($destroot);
|
||||||
|
|
||||||
$docs=dol_dir_list($srcroot, 'files', 0, 'website_.*(\.zip|\.jpg)$');
|
$docs=dol_dir_list($srcroot, 'files', 0, 'website_.*(\.zip|\.jpg)$');
|
||||||
foreach($docs as $cursorfile)
|
foreach($docs as $cursorfile) {
|
||||||
{
|
|
||||||
$src=$srcroot.'/'.$cursorfile['name'];
|
$src=$srcroot.'/'.$cursorfile['name'];
|
||||||
$dest=$destroot.'/'.$cursorfile['name'];
|
$dest=$destroot.'/'.$cursorfile['name'];
|
||||||
|
|
||||||
$result=dol_copy($src, $dest, 0, 0);
|
$result=dol_copy($src, $dest, 0, 0);
|
||||||
if ($result < 0)
|
if ($result < 0) {
|
||||||
{
|
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
|
$this->error=$langs->trans('ErrorFailToCopyFile', $src, $dest);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -668,8 +668,7 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||||
if (empty($hidetop)) {
|
if (empty($hidetop)) {
|
||||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '', 'C');
|
||||||
'C');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,10 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
public $searchcode; // String de recherche
|
public $searchcode; // String de recherche
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,10 @@ class mod_codeproduct_leopard extends ModeleProductCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -142,10 +142,9 @@ class pdf_squille extends ModelePdfReception
|
|||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
|
|
||||||
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj)
|
foreach ($objphoto->liste_photos($dir, 1) as $key => $obj) {
|
||||||
{
|
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) {
|
||||||
if (empty($conf->global->CAT_HIGH_QUALITY_IMAGES)) // If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
// If CAT_HIGH_QUALITY_IMAGES not defined, we use thumb if defined and then original photo
|
||||||
{
|
|
||||||
if ($obj['photo_vignette'])
|
if ($obj['photo_vignette'])
|
||||||
{
|
{
|
||||||
$filename= $obj['photo_vignette'];
|
$filename= $obj['photo_vignette'];
|
||||||
@ -461,8 +460,7 @@ class pdf_squille extends ModelePdfReception
|
|||||||
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
||||||
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
//$pdf->MultiCell(($this->posxqtyordered - $this->posxweightvol), 3, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt,'','C');
|
||||||
|
|
||||||
if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED))
|
if (empty($conf->global->RECEPTION_PDF_HIDE_ORDERED)) {
|
||||||
{
|
|
||||||
$pdf->SetXY($this->posxqtyordered, $curY);
|
$pdf->SetXY($this->posxqtyordered, $curY);
|
||||||
if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){
|
if($object->lines[$i]->fk_commandefourndet!=$fk_commandefourndet){
|
||||||
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C');
|
$pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked, '', 'C');
|
||||||
|
|||||||
@ -198,8 +198,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add odtgeneration hook
|
// Add odtgeneration hook
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager)) {
|
||||||
{
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($this->db);
|
$hookmanager=new HookManager($this->db);
|
||||||
}
|
}
|
||||||
@ -412,8 +411,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$odfHandler->title = $object->builddoc_filename;
|
$odfHandler->title = $object->builddoc_filename;
|
||||||
$odfHandler->subject = $object->builddoc_filename;
|
$odfHandler->subject = $object->builddoc_filename;
|
||||||
|
|
||||||
if (! empty($conf->global->ODT_ADD_DOLIBARR_ID))
|
if (! empty($conf->global->ODT_ADD_DOLIBARR_ID)) {
|
||||||
{
|
|
||||||
$odfHandler->userdefined['dol_id'] = $object->id;
|
$odfHandler->userdefined['dol_id'] = $object->id;
|
||||||
$odfHandler->userdefined['dol_element'] = $object->element;
|
$odfHandler->userdefined['dol_element'] = $object->element;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,10 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
public $searchcode; // String de recherche
|
public $searchcode; // String de recherche
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,10 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -51,7 +51,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
|
|||||||
*/
|
*/
|
||||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||||
|
|
||||||
public $code_auto; // Numerotation automatique
|
/**
|
||||||
|
* @var int Automatic numbering
|
||||||
|
*/
|
||||||
|
public $code_auto;
|
||||||
|
|
||||||
public $prefixcustomer='CU';
|
public $prefixcustomer='CU';
|
||||||
|
|
||||||
|
|||||||
@ -715,8 +715,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
|
||||||
//{
|
//{
|
||||||
//Local tax 1
|
//Local tax 1
|
||||||
foreach($this->localtax1 as $tvakey => $tvaval)
|
foreach ($this->localtax1 as $tvakey => $tvaval) {
|
||||||
{
|
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
@ -743,8 +742,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
//{
|
//{
|
||||||
//Local tax 2
|
//Local tax 2
|
||||||
foreach($this->localtax2 as $tvakey => $tvaval)
|
foreach($this->localtax2 as $tvakey => $tvaval) {
|
||||||
{
|
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
{
|
{
|
||||||
//$this->atleastoneratenotnull++;
|
//$this->atleastoneratenotnull++;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@ -464,8 +464,7 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
if($value == 'radio')$value = 'select';
|
if($value == 'radio')$value = 'select';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val)
|
foreach ($extrafields->attributes[$elementtype]['label'] as $key => $val) {
|
||||||
{
|
|
||||||
print '<tr><td>' . $extrafields->attributes[$elementtype]['label'][$key];
|
print '<tr><td>' . $extrafields->attributes[$elementtype]['label'][$key];
|
||||||
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
if ($array_query['options_' . $key . '_cnct'] != '' || (is_array($array_query['options_' . $key . '_cnct']) && count($array_query['options_' . $key . '_cnct']) > 0)) {
|
||||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||||
@ -486,7 +485,6 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
print '</td><td>' . $langs->trans("AdvTgtEndDt") . '</td><td>';
|
||||||
print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct');
|
print $form->selectDate('', 'options_' . $key . '_end_dt' . '_cnct');
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||||
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) {
|
} elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'boolean')) {
|
||||||
@ -515,24 +513,19 @@ print '<script type="text/javascript" language="javascript">
|
|||||||
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
print $extrafields->showInputField($key, $array_query['options_' . $key . '_cnct'], '', '_cnct');
|
||||||
}
|
}
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td><td>' . "\n";
|
print '</td><td>' . "\n";
|
||||||
}
|
}
|
||||||
print '</td></tr>' . "\n";
|
print '</td></tr>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr>' . "\n";
|
print '<tr>' . "\n";
|
||||||
print '<td colspan="3" class="right">' . "\n";
|
print '<td colspan="3" class="right">' . "\n";
|
||||||
|
|
||||||
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
print '<input type="button" name="addcontact" id="addcontact" value="' . $langs->trans('AdvTgtAddContact') . '" class="butAction"/>' . "\n";
|
||||||
|
|
||||||
print '</td>' . "\n";
|
print '</td>' . "\n";
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
print '</table>' . "\n";
|
print '</table>' . "\n";
|
||||||
print '</form>' . "\n";
|
print '</form>' . "\n";
|
||||||
print '</div>' . "\n";
|
print '</div>' . "\n";
|
||||||
|
|
||||||
print '<form action="' . $_SERVER['PHP_SELF'] . '?action=clear&id=' . $object->id . '" method="POST">';
|
print '<form action="' . $_SERVER['PHP_SELF'] . '?action=clear&id=' . $object->id . '" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere"));
|
print load_fiche_titre($langs->trans("ToClearAllRecipientsClickHere"));
|
||||||
|
|||||||
@ -211,8 +211,7 @@ if ($permission) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="tagtd"><?php echo $tab[$i]['libelle']; ?></div>
|
<div class="tagtd"><?php echo $tab[$i]['libelle']; ?></div>
|
||||||
<div class="tagtd center">
|
<div class="tagtd center">
|
||||||
<?php //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">'; ?>
|
<?php //if ($object->statut >= 0) echo '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=swapstatut&ligne='.$tab[$i]['rowid'].'">';
|
||||||
<?php
|
|
||||||
if ($tab[$i]['source']=='internal')
|
if ($tab[$i]['source']=='internal')
|
||||||
{
|
{
|
||||||
echo $userstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
echo $userstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
||||||
@ -221,8 +220,7 @@ if ($permission) {
|
|||||||
{
|
{
|
||||||
echo $contactstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
echo $contactstatic->LibStatut($tab[$i]['statuscontact'], 3);
|
||||||
}
|
}
|
||||||
?>
|
//if ($object->statut >= 0) echo '</a>'; ?>
|
||||||
<?php //if ($object->statut >= 0) echo '</a>'; ?>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tagtd nowrap right">
|
<div class="tagtd nowrap right">
|
||||||
<?php if ($permission) { ?>
|
<?php if ($permission) { ?>
|
||||||
@ -231,21 +229,16 @@ if ($permission) {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php $i++; ?>
|
<?php $i++;
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
</div>
|
print "</div>\n";
|
||||||
</div>
|
print "</div>\n";
|
||||||
<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->
|
print "<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->\n";
|
||||||
<?php
|
if (is_object($hookmanager)) {
|
||||||
if (is_object($hookmanager))
|
|
||||||
{
|
|
||||||
$hookmanager->initHooks(array('contacttpl'));
|
$hookmanager->initHooks(array('contacttpl'));
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
|
$reshook=$hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
|
||||||
}
|
}
|
||||||
?>
|
print "<!-- END PHP TEMPLATE CONTACTS -->\n";
|
||||||
<!-- END PHP TEMPLATE CONTACTS -->
|
|
||||||
|
|||||||
@ -63,10 +63,8 @@ if (! isset($conf->global->THEME_ELDY_TOPMENU_BACK1)) $conf->global->THEME_ELDY_
|
|||||||
$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
$colorbackhmenu1 = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED)?(empty($conf->global->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$conf->global->THEME_ELDY_TOPMENU_BACK1):(empty($user->conf->THEME_ELDY_TOPMENU_BACK1)?$colorbackhmenu1:$user->conf->THEME_ELDY_TOPMENU_BACK1);
|
||||||
$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
$colorbackhmenu1 = join(',', colorStringToArray($colorbackhmenu1)); // Normalize value to 'x,y,z'
|
||||||
|
|
||||||
?>
|
print "<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->\n";
|
||||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||||
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
// For example $conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND = 'https://source.unsplash.com/random'
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -90,10 +90,8 @@ if (!empty($extrafields))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_create.tpl.php -->\n";
|
||||||
<?php
|
|
||||||
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
|
$nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines);
|
||||||
if ($nolinesbefore) {
|
if ($nolinesbefore) {
|
||||||
?>
|
?>
|
||||||
@ -373,9 +371,9 @@ if ($nolinesbefore) {
|
|||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth150" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
<td class="nobottom linecolresupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth150" value="<?php echo (isset($_POST["fourn_ref"])?GETPOST("fourn_ref", 'alpha', 2):''); ?>"></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<td class="nobottom linecolvat right"><?php
|
print '<td class="nobottom linecolvat right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
if ($seller->tva_assuj == "0") echo '<input type="hidden" name="tva_tx" id="tva_tx" value="0">'.vatrate(0, true);
|
||||||
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?GETPOST("tva_tx", 'alpha', 2):-1), $seller, $buyer, 0, 0, '', false, 1);
|
||||||
@ -392,9 +390,9 @@ if ($nolinesbefore) {
|
|||||||
<td class="nobottom linecoluht_currency right">
|
<td class="nobottom linecoluht_currency right">
|
||||||
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
<input type="text" size="5" name="multicurrency_price_ht" id="multicurrency_price_ht" class="flat right" value="<?php echo (isset($_POST["multicurrency_price_ht"])?GETPOST("multicurrency_price_ht", 'alpha', 2):''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if (! empty($inputalsopricewithtax)) {
|
if (! empty($inputalsopricewithtax)) {
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
?>
|
?>
|
||||||
<td class="nobottom linecoluttc right">
|
<td class="nobottom linecoluttc right">
|
||||||
@ -512,17 +510,13 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
|
|||||||
print 'jQuery("#date_endmin").val("'.$conf->global->MAIN_DEFAULT_DATE_END_MIN.'");';
|
print 'jQuery("#date_endmin").val("'.$conf->global->MAIN_DEFAULT_DATE_END_MIN.'");';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</script>'
|
print '</script>';
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
print "</tr>\n";
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<script>
|
print "<script>\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
if (! empty($usemargins) && $user->rights->margins->creer)
|
if (! empty($usemargins) && $user->rights->margins->creer)
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -54,11 +54,9 @@ $colspan = 3; // Col total ht + col edit + col delete
|
|||||||
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
if (! empty($inputalsopricewithtax)) $colspan++; // We add 1 if col total ttc
|
||||||
if (in_array($object->element, array('propal','supplier_proposal','facture','facturerec','invoice','commande','order','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button
|
if (in_array($object->element, array('propal','supplier_proposal','facture','facturerec','invoice','commande','order','order_supplier','invoice_supplier'))) $colspan++; // With this, there is a column move button
|
||||||
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
|
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) $colspan+=2;
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
$coldisplay=0;
|
$coldisplay=0;
|
||||||
?>
|
?>
|
||||||
<tr class="oddeven tredited">
|
<tr class="oddeven tredited">
|
||||||
@ -168,8 +166,9 @@ $coldisplay=0;
|
|||||||
print '></td>';
|
print '></td>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td class="right"><?php $coldisplay++; ?>
|
<td class="right">
|
||||||
<?php if (($line->info_bits & 2) != 2) {
|
<?php $coldisplay++;
|
||||||
|
if (($line->info_bits & 2) != 2) {
|
||||||
// I comment this because it shows info even when not required
|
// I comment this because it shows info even when not required
|
||||||
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
|
||||||
// must also not be output for most entities (proposal, intervention, ...)
|
// must also not be output for most entities (proposal, intervention, ...)
|
||||||
@ -192,8 +191,9 @@ $coldisplay=0;
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<td class="nowrap right"><?php $coldisplay++; ?>
|
<td class="nowrap right">
|
||||||
<?php if (($line->info_bits & 2) != 2) {
|
<?php $coldisplay++;
|
||||||
|
if (($line->info_bits & 2) != 2) {
|
||||||
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
||||||
if ($line->fk_prev_id != null ) print ' readonly';
|
if ($line->fk_prev_id != null ) print ' readonly';
|
||||||
print '>%';
|
print '>%';
|
||||||
|
|||||||
@ -39,9 +39,9 @@ if (empty($object) || ! is_object($object))
|
|||||||
print "Error, template page can't be called as URL";
|
print "Error, template page can't be called as URL";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->
|
print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||||
<?php
|
|
||||||
// Title line
|
// Title line
|
||||||
print "<thead>\n";
|
print "<thead>\n";
|
||||||
|
|
||||||
@ -90,17 +90,20 @@ if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))
|
|||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer))
|
if (!empty($user->rights->margins->creer))
|
||||||
{
|
{
|
||||||
if ($conf->global->MARGIN_TYPE == "1")
|
if ($conf->global->MARGIN_TYPE == "1") {
|
||||||
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
|
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('BuyingPrice').'</td>';
|
||||||
else
|
} else {
|
||||||
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('CostPrice').'</td>';
|
print '<td class="linecolmargin1 margininfos right" style="width: 80px">'.$langs->trans('CostPrice').'</td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous)
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) {
|
||||||
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate').'</td>';
|
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarginRate').'</td>';
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous)
|
}
|
||||||
|
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {
|
||||||
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarkRate').'</td>';
|
print '<td class="linecolmargin2 margininfos right" style="width: 50px">'.$langs->trans('MarkRate').'</td>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Total HT
|
// Total HT
|
||||||
print '<td class="linecolht right">'.$langs->trans('TotalHTShort').'</td>';
|
print '<td class="linecolht right">'.$langs->trans('TotalHTShort').'</td>';
|
||||||
@ -126,6 +129,5 @@ if($action == 'selectlines')
|
|||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print "</thead>\n";
|
print "</thead>\n";
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE objectline_title.tpl.php -->
|
print "<!-- END PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||||
|
|||||||
@ -64,8 +64,7 @@ $domData .= ' data-qty="'.$line->qty.'"';
|
|||||||
$domData .= ' data-product_type="'.$line->product_type.'"';
|
$domData .= ' data-product_type="'.$line->product_type.'"';
|
||||||
|
|
||||||
|
|
||||||
?>
|
$coldisplay=0; ?>
|
||||||
<?php $coldisplay=0; ?>
|
|
||||||
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE objectline_view.tpl.php -->
|
||||||
<tr id="row-<?php echo $line->id?>" class="drag drop oddeven" <?php echo $domData; ?> >
|
<tr id="row-<?php echo $line->id?>" class="drag drop oddeven" <?php echo $domData; ?> >
|
||||||
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
|
||||||
@ -74,9 +73,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
<td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div>
|
<td class="linecoldescription minwidth300imp"><?php $coldisplay++; ?><div id="line_<?php echo $line->id; ?>"></div>
|
||||||
<?php
|
<?php
|
||||||
if (($line->info_bits & 2) == 2) {
|
if (($line->info_bits & 2) == 2) {
|
||||||
?>
|
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid.'">';
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$this->socid; ?>">
|
|
||||||
<?php
|
|
||||||
$txt='';
|
$txt='';
|
||||||
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
print img_object($langs->trans("ShowReduc"), 'reduc').' ';
|
||||||
if ($line->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
if ($line->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
||||||
@ -84,9 +81,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
elseif ($line->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
elseif ($line->description == '(EXCESS PAID)') $txt=$langs->trans("ExcessPaid");
|
||||||
//else $txt=$langs->trans("Discount");
|
//else $txt=$langs->trans("Discount");
|
||||||
print $txt;
|
print $txt;
|
||||||
?>
|
print '</a>';
|
||||||
</a>
|
|
||||||
<?php
|
|
||||||
if ($line->description)
|
if ($line->description)
|
||||||
{
|
{
|
||||||
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
|
if ($line->description == '(CREDIT_NOTE)' && $line->fk_remise_except > 0)
|
||||||
@ -188,20 +183,16 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
echo '<div class="clearboth"></div><br><span class="opacitymedium">' . $langs->trans('AccountingAffectation') . ' : </span>' . $accountingaccount->getNomUrl(0, 1, 1);
|
echo '<div class="clearboth"></div><br><span class="opacitymedium">' . $langs->trans('AccountingAffectation') . ' : </span>' . $accountingaccount->getNomUrl(0, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||||
{
|
{
|
||||||
?>
|
print '<td class="linecolrefsupplier">';
|
||||||
<td class="linecolrefsupplier"><?php
|
|
||||||
echo ($line->ref_fourn?$line->ref_fourn:$line->ref_supplier);
|
echo ($line->ref_fourn?$line->ref_fourn:$line->ref_supplier);
|
||||||
?></td>
|
print '</td>';
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
// VAT Rate
|
// VAT Rate
|
||||||
?>
|
print '<td class="linecolvat nowrap right">';
|
||||||
<td class="linecolvat nowrap right"><?php $coldisplay++; ?><?php
|
$coldisplay++;
|
||||||
$positiverates='';
|
$positiverates='';
|
||||||
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
|
if (price2num($line->tva_tx)) $positiverates.=($positiverates?'/':'').price2num($line->tva_tx);
|
||||||
if (price2num($line->total_localtax1)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
if (price2num($line->total_localtax1)) $positiverates.=($positiverates?'/':'').price2num($line->localtax1_tx);
|
||||||
@ -215,9 +206,9 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
|
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
||||||
<td class="linecoluht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_subprice); ?></td>
|
<td class="linecoluht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_subprice); ?></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
<?php if ($inputalsopricewithtax) { ?>
|
if ($inputalsopricewithtax) { ?>
|
||||||
<td class="linecoluttc nowrap right"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
<td class="linecoluttc nowrap right"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
@ -230,10 +221,8 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
|
||||||
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price
|
||||||
} else echo ' ';
|
} else echo ' ';
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if ($conf->global->PRODUCT_USE_UNITS)
|
if ($conf->global->PRODUCT_USE_UNITS)
|
||||||
{
|
{
|
||||||
print '<td class="linecoluseunit nowrap left">';
|
print '<td class="linecoluseunit nowrap left">';
|
||||||
@ -243,17 +232,16 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
?>
|
if (!empty($line->remise_percent) && $line->special_code != 3) {
|
||||||
|
print '<td class="linecoldiscount right">';
|
||||||
<?php if (!empty($line->remise_percent) && $line->special_code != 3) { ?>
|
|
||||||
<td class="linecoldiscount right"><?php
|
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
echo dol_print_reduction($line->remise_percent, $langs);
|
echo dol_print_reduction($line->remise_percent, $langs);
|
||||||
?></td>
|
print '</td>';
|
||||||
<?php } else { ?>
|
} else {
|
||||||
<td class="linecoldiscount"><?php $coldisplay++; ?> </td>
|
print '<td class="linecoldiscount"> </td>';
|
||||||
<?php }
|
$coldisplay++;
|
||||||
|
}
|
||||||
|
|
||||||
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT);
|
||||||
|
|
||||||
@ -273,20 +261,18 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
{
|
{
|
||||||
if (!empty($user->rights->margins->creer)) { ?>
|
if (!empty($user->rights->margins->creer)) { ?>
|
||||||
<td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
|
<td class="linecolmargin1 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->pa_ht); ?></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { ?>
|
||||||
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
|
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) {?>
|
||||||
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
|
<td class="linecolmargin2 nowrap margininfos right"><?php $coldisplay++; ?><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
|
||||||
<?php }
|
<?php }
|
||||||
}
|
}
|
||||||
?>
|
if ($line->special_code == 3) { ?>
|
||||||
|
|
||||||
<?php if ($line->special_code == 3) { ?>
|
|
||||||
<td class="linecoloption nowrap right"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
<td class="linecoloption nowrap right"><?php $coldisplay++; ?><?php echo $langs->trans('Option'); ?></td>
|
||||||
<?php } else { ?>
|
<?php } else {
|
||||||
<td class="linecolht nowrap right"><?php
|
print '<td class="linecolht nowrap right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
{
|
{
|
||||||
@ -303,74 +289,69 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
|
|||||||
{
|
{
|
||||||
print '</span>';
|
print '</span>';
|
||||||
}
|
}
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||||
<?php if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { ?>
|
print '<td class="linecolutotalht_currency nowrap right">'.price($line->multicurrency_total_ht).'</td>';
|
||||||
<td class="linecolutotalht_currency nowrap right"><?php $coldisplay++; ?><?php echo price($line->multicurrency_total_ht); ?></td>
|
$coldisplay++;
|
||||||
<?php } ?>
|
}
|
||||||
<?php } ?>
|
}
|
||||||
<?php if ($outputalsopricetotalwithtax) { ?>
|
if ($outputalsopricetotalwithtax) {
|
||||||
<td class="linecolht nowrap right"><?php $coldisplay++; ?><?php echo price($line->total_ttc); ?></td>
|
print '<td class="linecolht nowrap right">'.price($line->total_ttc).'</td>';
|
||||||
<?php } ?>
|
$coldisplay++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines' ) {
|
||||||
<?php
|
print '<td class="linecoledit center">';
|
||||||
if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines' ) { ?>
|
$coldisplay++;
|
||||||
<td class="linecoledit center"><?php $coldisplay++; ?>
|
if (($line->info_bits & 2) == 2 || ! empty($disableedit)) {
|
||||||
<?php if (($line->info_bits & 2) == 2 || ! empty($disableedit)) { ?>
|
} else { ?>
|
||||||
<?php } else { ?>
|
|
||||||
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id; ?>">
|
<a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id; ?>">
|
||||||
<?php echo img_edit(); ?>
|
<?php echo img_edit().'</a>';
|
||||||
</a>
|
}
|
||||||
<?php } ?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<td class="linecoldelete center"><?php $coldisplay++; ?>
|
print '<td class="linecoldelete center">';
|
||||||
<?php
|
$coldisplay++;
|
||||||
if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
|
if (($line->fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation
|
||||||
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">';
|
print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $this->id . '&action=ask_deleteline&lineid=' . $line->id . '">';
|
||||||
print img_delete();
|
print img_delete();
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
?>
|
print '</td>';
|
||||||
</td>
|
|
||||||
|
|
||||||
<?php
|
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) {
|
||||||
if ($num > 1 && $conf->browser->layout != 'phone' && ($this->situation_counter == 1 || !$this->situation_cycle_ref) && empty($disablemove)) { ?>
|
print '<td class="linecolmove tdlineupdown center">';
|
||||||
<td class="linecolmove tdlineupdown center"><?php $coldisplay++; ?>
|
$coldisplay++;
|
||||||
<?php if ($i > 0) { ?>
|
if ($i > 0) { ?>
|
||||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=up&rowid='.$line->id; ?>">
|
||||||
<?php echo img_up('default', 0, 'imgupforline'); ?>
|
<?php echo img_up('default', 0, 'imgupforline'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php }
|
||||||
<?php if ($i < $num-1) { ?>
|
if ($i < $num-1) { ?>
|
||||||
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id; ?>">
|
<a class="lineupdown" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->id.'&action=down&rowid='.$line->id; ?>">
|
||||||
<?php echo img_down('default', 0, 'imgdownforline'); ?>
|
<?php echo img_down('default', 0, 'imgdownforline'); ?>
|
||||||
</a>
|
</a>
|
||||||
<?php } ?>
|
<?php }
|
||||||
</td>
|
print '</td>';
|
||||||
<?php } else { ?>
|
|
||||||
<td <?php echo (($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>><?php $coldisplay++; ?></td>
|
|
||||||
<?php } ?>
|
|
||||||
<?php
|
|
||||||
} else {
|
} else {
|
||||||
?>
|
print '<td '.(($conf->browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"').'></td>';
|
||||||
<td colspan="3"><?php $coldisplay=$coldisplay+3; ?></td>
|
$coldisplay++;
|
||||||
<?php
|
}
|
||||||
|
} else {
|
||||||
|
print '<td colspan="3"></td>';
|
||||||
|
$coldisplay = $coldisplay+3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'selectlines') { ?>
|
if ($action == 'selectlines') { ?>
|
||||||
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
<td class="linecolcheck center"><input type="checkbox" class="linecheckbox" name="line_checkbox[<?php echo $i+1; ?>]" value="<?php echo $line->id; ?>" ></td>
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
|
||||||
</tr>
|
print "</tr>\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
//Line extrafield
|
//Line extrafield
|
||||||
if (!empty($extrafields))
|
if (!empty($extrafields))
|
||||||
{
|
{
|
||||||
print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1);
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE objectline_view.tpl.php -->
|
print "<!-- END PHP TEMPLATE objectline_view.tpl.php -->\n";
|
||||||
|
|||||||
@ -555,7 +555,9 @@ if ( $object->socid && ! empty($conf->societe->enabled) && ! empty($conf->global
|
|||||||
// Country
|
// Country
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans('Country').'</td><td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans('Country').'</td><td>';
|
||||||
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code), 'country_id');
|
print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code), 'country_id');
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
if ($user->admin) {
|
||||||
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
|
print "<tr>".'<td>'.$langs->trans("EMail").'</td><td><input type="text" name="email" class="maxwidth200" value="'.dol_escape_htmltag($object->email).'"></td></tr>';
|
||||||
@ -642,8 +644,9 @@ if (! empty($id) && $action != 'edit')
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' ';
|
$morehtmlref.=$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->don->creer)
|
if ($user->rights->don->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -124,8 +124,9 @@ if ($object->id)
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' ';
|
$morehtmlref.=$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->don->creer)
|
if ($user->rights->don->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -79,8 +79,9 @@ if (! empty($conf->projet->enabled))
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' ';
|
$morehtmlref.=$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->don->creer)
|
if ($user->rights->don->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -95,8 +95,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.=$langs->trans('Project') . ' ';
|
$morehtmlref.=$langs->trans('Project') . ' ';
|
||||||
if ($user->rights->don->creer)
|
if ($user->rights->don->creer)
|
||||||
{
|
{
|
||||||
if ($action != 'classify')
|
if ($action != 'classify') {
|
||||||
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
// $morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||||
|
}
|
||||||
if ($action == 'classify') {
|
if ($action == 'classify') {
|
||||||
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
|
||||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||||
|
|||||||
@ -238,8 +238,9 @@ if (GETPOST('action', 'aZ09') == 'create')
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Autres charges impayees
|
* List of payments on donation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$num = 1;
|
$num = 1;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
@ -279,12 +280,12 @@ if (GETPOST('action', 'aZ09') == 'create')
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$total+=$objp->total;
|
/*$total+=$objp->total;
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$totalrecu+=$objp->am;
|
$totalrecu+=$objp->am;*/ //Useless code ?
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($i > 1)
|
/*if ($i > 1)
|
||||||
{
|
{
|
||||||
// Print total
|
// Print total
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -294,7 +295,7 @@ if (GETPOST('action', 'aZ09') == 'create')
|
|||||||
print "<td class=\"right\"><b>".price($total_ttc - $totalrecu)."</b></td>";
|
print "<td class=\"right\"><b>".price($total_ttc - $totalrecu)."</b></td>";
|
||||||
print '<td class="center"> </td>';
|
print '<td class="center"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}*/ //Useless code ?
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,8 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- BEGIN PHP TEMPLATE -->
|
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
global $noMoreLinkedObjectBlockAfter;
|
global $noMoreLinkedObjectBlockAfter;
|
||||||
@ -32,26 +29,25 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
|||||||
|
|
||||||
$langs->load("donations");
|
$langs->load("donations");
|
||||||
|
|
||||||
$total=0; $ilink=0;
|
$total=0;
|
||||||
|
$ilink=0;
|
||||||
foreach($linkedObjectBlock as $key => $objectlink) {
|
foreach($linkedObjectBlock as $key => $objectlink) {
|
||||||
$ilink++;
|
$ilink++;
|
||||||
|
|
||||||
$trclass='oddeven';
|
$trclass='oddeven';
|
||||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total';
|
||||||
?>
|
print '<tr class="'.$trclass.'">';
|
||||||
<tr class="<?php echo $trclass; ?>">
|
print '<td>'.$langs->trans("Donation").'</td>';
|
||||||
<td><?php echo $langs->trans("Donation"); ?></td>
|
print '<td>'.$objectlink->getNomUrl(1).'</td>';
|
||||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
print '<td class="center">'.$objectlink->ref_client.'</td>';
|
||||||
<td class="center"><?php echo $objectlink->ref_client; ?></td>
|
print '<td class="center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||||
<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
|
print '<td class="right">';
|
||||||
<td class="right"><?php
|
|
||||||
$total = $total + $objectlink->total_ht;
|
$total = $total + $objectlink->total_ht;
|
||||||
echo price($objectlink->total_ht);
|
echo price($objectlink->total_ht);
|
||||||
} ?>
|
}
|
||||||
</td>
|
print '</td>';
|
||||||
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
|
print '<td class="right">'.$objectlink->getLibStatut(3).'</td>';
|
||||||
</tr>
|
print '</tr>';
|
||||||
<?php
|
|
||||||
|
|
||||||
if (count($linkedObjectBlock) > 1)
|
if (count($linkedObjectBlock) > 1)
|
||||||
{
|
{
|
||||||
@ -67,6 +63,5 @@ if (count($linkedObjectBlock) > 1)
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- END PHP TEMPLATE -->
|
print "<!-- END PHP TEMPLATE -->\n";
|
||||||
|
|||||||
@ -1886,11 +1886,12 @@ class EmailCollector extends CommonObject
|
|||||||
// BODY
|
// BODY
|
||||||
$s = imap_fetchstructure($mbox, $mid);
|
$s = imap_fetchstructure($mbox, $mid);
|
||||||
|
|
||||||
if (!$s->parts) // simple
|
if (!$s->parts) {
|
||||||
|
// simple
|
||||||
$this->getpart($mbox, $mid, $s, 0); // pass 0 as part-number
|
$this->getpart($mbox, $mid, $s, 0); // pass 0 as part-number
|
||||||
else { // multipart: cycle through each part
|
} else {
|
||||||
foreach ($s->parts as $partno0=>$p)
|
// multipart: cycle through each part
|
||||||
{
|
foreach ($s->parts as $partno0 => $p) {
|
||||||
$this->getpart($mbox, $mid, $p, $partno0+1);
|
$this->getpart($mbox, $mid, $p, $partno0+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user