Merge remote-tracking branch 'upstream/develop' into patch-6

This commit is contained in:
Frédéric FRANCE 2019-12-06 23:07:52 +01:00
commit 817097763b
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
57 changed files with 361 additions and 312 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 KiB

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -245,18 +245,6 @@ export list="
--ignore-table=$base.llx_c_ticketsup_category --ignore-table=$base.llx_c_ticketsup_category
--ignore-table=$base.llx_c_ticketsup_severity --ignore-table=$base.llx_c_ticketsup_severity
--ignore-table=$base.llx_c_ticketsup_type --ignore-table=$base.llx_c_ticketsup_type
--ignore-table=$base.llx_cabinetmed_c_banques
--ignore-table=$base.llx_cabinetmed_c_ccam
--ignore-table=$base.llx_cabinetmed_c_examconclusion
--ignore-table=$base.llx_cabinetmed_cons
--ignore-table=$base.llx_cabinetmed_cons_extrafields
--ignore-table=$base.llx_cabinetmed_diaglec
--ignore-table=$base.llx_cabinetmed_examaut
--ignore-table=$base.llx_cabinetmed_exambio
--ignore-table=$base.llx_cabinetmed_examenprescrit
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_congespayes --ignore-table=$base.llx_congespayes
--ignore-table=$base.llx_congespayes_config --ignore-table=$base.llx_congespayes_config
--ignore-table=$base.llx_congespayes_events --ignore-table=$base.llx_congespayes_events
@ -300,6 +288,7 @@ export list="
--ignore-table=$base.llx_m_extrafields --ignore-table=$base.llx_m_extrafields
--ignore-table=$base.llx_monmodule_abcdef --ignore-table=$base.llx_monmodule_abcdef
--ignore-table=$base.llx_notes --ignore-table=$base.llx_notes
--ignore-table=$base.llx_packages
--ignore-table=$base.llx_pos_cash --ignore-table=$base.llx_pos_cash
--ignore-table=$base.llx_pos_control_cash --ignore-table=$base.llx_pos_control_cash
--ignore-table=$base.llx_pos_facture --ignore-table=$base.llx_pos_facture
@ -316,6 +305,7 @@ export list="
--ignore-table=$base.llx_residence_building --ignore-table=$base.llx_residence_building
--ignore-table=$base.llx_residence_building_links --ignore-table=$base.llx_residence_building_links
--ignore-table=$base.llx_societe_rib2 --ignore-table=$base.llx_societe_rib2
--ignore-table=$base.llx_sellyoursaas_cancellation
--ignore-table=$base.llx_ticketsup --ignore-table=$base.llx_ticketsup
--ignore-table=$base.llx_ultimatepdf --ignore-table=$base.llx_ultimatepdf
--ignore-table=$base.llx_update_modules --ignore-table=$base.llx_update_modules

View File

@ -7,6 +7,9 @@
# Usage: txpull.sh (all|xx_XX) [-r dolibarr.file] [-f] # Usage: txpull.sh (all|xx_XX) [-r dolibarr.file] [-f]
#------------------------------------------------------ #------------------------------------------------------
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../..
# Syntax # Syntax
if [ "x$1" = "x" ] if [ "x$1" = "x" ]
then then

View File

@ -9,6 +9,9 @@
export project='dolibarr' export project='dolibarr'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/../..
# Syntax # Syntax
if [ "x$1" = "x" ] if [ "x$1" = "x" ]
then then

View File

@ -1072,16 +1072,10 @@ else
// Other attributes // Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
//Hooks here
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '<tbody>'; print '<tbody>';
print "</table>\n"; print "</table>\n";
dol_fiche_end(); dol_fiche_end();
print '<div class="center">'; print '<div class="center">';
@ -1769,7 +1763,7 @@ else
/* /*
* Hotbar * Action bar
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';

View File

@ -71,7 +71,6 @@ $adht = new AdherentType($db);
$extrafields->fetch_name_optionals_label($object->table_element); $extrafields->fetch_name_optionals_label($object->table_element);
$errmsg = ''; $errmsg = '';
$errmsgs = array();
$defaultdelay = 1; $defaultdelay = 1;
$defaultdelayunit = 'y'; $defaultdelayunit = 'y';
@ -687,20 +686,19 @@ if ($rowid > 0)
$subscriptionstatic = new Subscription($db); $subscriptionstatic = new Subscription($db);
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0;
print '<table class="noborder centpercent">'."\n"; print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateCreation").'</td>'; print_liste_field_titre('DateCreation', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td align="center">'.$langs->trans("Type").'</td>'; print_liste_field_titre('Type', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateStart").'</td>'; print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateEnd").'</td>'; print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="right">'.$langs->trans("Amount").'</td>'; print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
if (!empty($conf->banque->enabled)) if (!empty($conf->banque->enabled))
{ {
print '<td class="right">'.$langs->trans("Account").'</td>'; print_liste_field_titre('Account', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
} }
print "</tr>\n"; print "</tr>\n";
@ -708,6 +706,7 @@ if ($rowid > 0)
$adh = new Adherent($db); $adh = new Adherent($db);
$adht = new AdherentType($db); $adht = new AdherentType($db);
$i = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
@ -766,6 +765,13 @@ if ($rowid > 0)
print "</tr>"; print "</tr>";
$i++; $i++;
} }
if (empty($num)) {
$colspan = 6;
if (!empty($conf->banque->enabled)) $colspan++;
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
}
print "</table>"; print "</table>";
} }
else else
@ -1002,7 +1008,7 @@ if ($rowid > 0)
print $langs->trans("CreateDolibarrThirdParty"); print $langs->trans("CreateDolibarrThirdParty");
print '</a>)'; print '</a>)';
} }
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled)))
{ {
$prodtmp = new Product($db); $prodtmp = new Product($db);
@ -1027,7 +1033,7 @@ if ($rowid > 0)
print $langs->trans("CreateDolibarrThirdParty"); print $langs->trans("CreateDolibarrThirdParty");
print '</a>)'; print '</a>)';
} }
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled)))
{ {
$prodtmp = new Product($db); $prodtmp = new Product($db);
@ -1070,9 +1076,9 @@ if ($rowid > 0)
} }
} }
print '<tr><td colspan="2">&nbsp;</td>'; print '<tr><td></td><td></td></tr>';
print '<tr><td width="30%">'.$langs->trans("SendAcknowledgementByMail").'</td>'; print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
print '<td>'; print '<td>';
if (!$object->email) if (!$object->email)
{ {
@ -1117,11 +1123,20 @@ if ($rowid > 0)
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n";
if ($subjecttosend) {
$helpcontent .= $subjecttosend."\n"; $helpcontent .= $subjecttosend."\n";
} else {
$langs->load("errors");
$helpcontent .= '<span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).'</span>'."\n";
}
$helpcontent .= "<br>"; $helpcontent .= "<br>";
$helpcontent .= '<b>'.$langs->trans("MailText").'</b>:<br>'; $helpcontent .= '<b>'.$langs->trans("MailText").'</b>:<br>';
if ($texttosend) {
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; $helpcontent .= dol_htmlentitiesbr($texttosend)."\n";
} else {
$langs->load("errors");
$helpcontent .= '<span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).'</span>'."\n";
}
print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend'); print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend');
} }
print '</td></tr>'; print '</td></tr>';

View File

@ -1052,7 +1052,7 @@ if ($action == 'create')
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1); $numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
$urloption = '?action=create'; $urloption = '?action=create';
$url = dol_buildpath('comm/action/card.php', 2).$urloption; $url = dol_buildpath('comm/action/card.php', 2).$urloption;

View File

@ -1475,6 +1475,7 @@ if ($action == 'create')
{ {
// Parse element/subelement (ex: project_task) // Parse element/subelement (ex: project_task)
$element = $subelement = $origin; $element = $subelement = $origin;
$regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs[1]; $element = $regs[1];
$subelement = $regs[2]; $subelement = $regs[2];
@ -1675,7 +1676,7 @@ if ($action == 'create')
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>'; print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1); $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -61,9 +61,9 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
//if ($user->rights->societe->creer) //if ($user->rights->societe->creer)
//if ($user->rights->facture->creer) //if ($user->rights->facture->creer)
$amount_ttc_1 = GETPOST('amount_ttc_1'); $amount_ttc_1 = GETPOST('amount_ttc_1', 'alpha');
$amount_ttc_1 = price2num($amount_ttc_1); $amount_ttc_1 = price2num($amount_ttc_1);
$amount_ttc_2 = GETPOST('amount_ttc_2'); $amount_ttc_2 = GETPOST('amount_ttc_2', 'alpha');
$amount_ttc_2 = price2num($amount_ttc_2); $amount_ttc_2 = price2num($amount_ttc_2);
$error = 0; $error = 0;
@ -252,7 +252,7 @@ if ($socid > 0)
print '<input type="hidden" name="action" value="setremise">'; print '<input type="hidden" name="action" value="setremise">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), -1, 'company');
dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
@ -273,7 +273,7 @@ if ($socid > 0)
} }
print '<table class="border centpercent">'; print '<table class="border centpercent tableforfield borderbottom">';
if ($isCustomer) { // Calcul avoirs client en cours if ($isCustomer) { // Calcul avoirs client en cours
$remise_all = $remise_user = 0; $remise_all = $remise_user = 0;
@ -342,13 +342,15 @@ if ($socid > 0)
print '</div>'; print '</div>';
dol_fiche_end();
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
print '<br>'; print '<br>';
print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', ''); print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', '');
print '<div class="underbanner clearboth"></div>';
if ($isCustomer && !$isSupplier) { if ($isCustomer && !$isSupplier) {
print '<input type="hidden" name="discount_type" value="0" />'; print '<input type="hidden" name="discount_type" value="0" />';
@ -358,6 +360,8 @@ if ($socid > 0)
print '<input type="hidden" name="discount_type" value="1" />'; print '<input type="hidden" name="discount_type" value="1" />';
} }
dol_fiche_head();
print '<table class="border centpercent">'; print '<table class="border centpercent">';
if ($isCustomer && $isSupplier) { if ($isCustomer && $isSupplier) {
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>'; print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
@ -376,9 +380,9 @@ if ($socid > 0)
print '<td><input type="text" class="quatrevingtpercent" name="desc" value="'.GETPOST('desc', 'none').'"></td></tr>'; print '<td><input type="text" class="quatrevingtpercent" name="desc" value="'.GETPOST('desc', 'none').'"></td></tr>';
print "</table>"; print "</table>";
}
dol_fiche_end(); dol_fiche_end();
}
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
@ -404,7 +408,7 @@ if ($socid > 0)
/* /*
* Liste remises fixes client restant en cours (= liees a aucune facture ni ligne de facture) * List remises fixes client restant en cours (= liees a aucune facture ni ligne de facture)
*/ */
print load_fiche_titre($langs->trans("DiscountStillRemaining")); print load_fiche_titre($langs->trans("DiscountStillRemaining"));
@ -511,15 +515,14 @@ if ($socid > 0)
{ {
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>'; print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
} }
print '<td align="center">'; print '<td class="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>'; print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>'; print '</td>';
if ($user->rights->societe->creer || $user->rights->facture->creer) if ($user->rights->societe->creer || $user->rights->facture->creer)
{ {
print '<td class="nowrap">'; print '<td class="center nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>'; print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
//print ' &nbsp; '; print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>'; print '</td>';
} }
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
@ -535,7 +538,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
$db->free($resql); $db->free($resql);
print "</table>"; print "</table>";
@ -551,7 +556,7 @@ if ($socid > 0)
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
); );
$langs->load("dict"); $langs->load("dict");
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, '', 0);
} }
} }
else else
@ -672,9 +677,8 @@ if ($socid > 0)
if ($user->rights->societe->creer || $user->rights->facture->creer) if ($user->rights->societe->creer || $user->rights->facture->creer)
{ {
print '<td class="center nowrap">'; print '<td class="center nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>'; print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
//print ' &nbsp; '; print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>'; print '</td>';
} }
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
@ -690,7 +694,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
$db->free($resql); $db->free($resql);
print "</table>"; print "</table>";
@ -738,7 +744,7 @@ if ($socid > 0)
// Discount linked to invoice lines // Discount linked to invoice lines
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql .= " rc.fk_facture_source,"; $sql .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture_source,";
$sql .= " u.login, u.rowid as user_id,"; $sql .= " u.login, u.rowid as user_id,";
$sql .= " f.rowid as invoiceid, f.ref,"; $sql .= " f.rowid as invoiceid, f.ref,";
$sql .= " fa.ref as invoice_source_ref, fa.type as type"; $sql .= " fa.ref as invoice_source_ref, fa.type as type";
@ -890,7 +896,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
print "</table>"; print "</table>";
@ -1064,7 +1072,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan+=2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
print "</table>"; print "</table>";

View File

@ -1642,7 +1642,7 @@ if ($action == 'create' && $usercancreate)
}); });
</script>'; </script>';
} }
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td>'; print '</td>';
} }
print '</tr>'."\n"; print '</tr>'."\n";
@ -1734,7 +1734,7 @@ if ($action == 'create' && $usercancreate)
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>'; print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0); $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -2801,7 +2801,7 @@ if ($action == 'create')
}); });
</script>'; </script>';
} }
if (!GETPOST('fac_rec', 'int')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; if (!GETPOST('fac_rec', 'int')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'."\n"; print '</tr>'."\n";
} }
@ -3008,7 +3008,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3016,7 +3016,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3025,7 +3025,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceReplacement").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceReplacement").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3114,7 +3114,7 @@ if ($action == 'create')
if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> '; if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
else $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > '; else $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > ';
$text = '<label>'.$tmp.$langs->trans("InvoiceAvoir").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceAvoir").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'."\n"; print '</div></div>'."\n";
@ -3211,7 +3211,6 @@ if ($action == 'create')
$rwStyle = ''; $rwStyle = '';
} }
$retained_warranty = GETPOST('retained_warranty', 'int'); $retained_warranty = GETPOST('retained_warranty', 'int');
$retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; $retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">'; print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
@ -3260,7 +3259,7 @@ if ($action == 'create')
$langs->load('projects'); $langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1); $numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td></tr>'; print '</td></tr>';
} }

View File

@ -4117,7 +4117,9 @@ class Form
// Now add questions // Now add questions
$more .= '<div class="tagtable paddingtopbottomonly centpercent noborderspacing">'."\n"; $more .= '<div class="tagtable paddingtopbottomonly centpercent noborderspacing">'."\n";
if (!empty($formquestion['text'])) $more .= '<tr><td colspan="2">'.$formquestion['text'].'</td></tr>'."\n"; if (!empty($formquestion['text'])) {
$more .= '<div class="tagtr"><div class="tagtd">'.$formquestion['text'].'</div></div>'."\n";
}
foreach ($formquestion as $key => $input) foreach ($formquestion as $key => $input)
{ {
if (is_array($input) && !empty($input)) if (is_array($input) && !empty($input))

View File

@ -200,7 +200,7 @@ class DoliDBPgsql extends DoliDB
} }
if (preg_match('/[\s\t\(]*(\w*)[\s\t]+bigint.*auto_increment/i', $line, $reg)) { if (preg_match('/[\s\t\(]*(\w*)[\s\t]+bigint.*auto_increment/i', $line, $reg)) {
$newline=preg_replace('/([\s\t\(]*)([a-zA-Z_0-9]*)[\s\t]+int.*auto_increment[^,]*/i', '\\1 \\2 BIGSERIAL PRIMARY KEY', $line); $newline=preg_replace('/([\s\t\(]*)([a-zA-Z_0-9]*)[\s\t]+bigint.*auto_increment[^,]*/i', '\\1 \\2 BIGSERIAL PRIMARY KEY', $line);
//$line = "-- ".$line." replaced by --\n".$newline; //$line = "-- ".$line." replaced by --\n".$newline;
$line=$newline; $line=$newline;
} }

View File

@ -3081,7 +3081,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap', 'address'=> 'address-book', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'project'=>'sitemap',
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'generic'=>'folder-open',
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'object_bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar', 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'object_bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar',
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork', 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-branch',
'object_list'=>'list-alt', 'object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table', 'object_list'=>'list-alt', 'object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table',
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt' 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt'

View File

@ -371,7 +371,7 @@ function correctExifImageOrientation($fileSource, $fileDest, $quality = 95)
$image = imagegif($img, $fileDest); $image = imagegif($img, $fileDest);
break; break;
case IMAGETYPE_JPEG: // 2 case IMAGETYPE_JPEG: // 2
return imagejpeg($img, $fileDest, $quality); $image = imagejpeg($img, $fileDest, $quality);
break; break;
case IMAGETYPE_PNG: // 3 case IMAGETYPE_PNG: // 3
$image = imagepng($img, $fileDest, $quality); $image = imagepng($img, $fileDest, $quality);
@ -454,12 +454,13 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
$imgWidth = $infoImg[0]; // Largeur de l'image $imgWidth = $infoImg[0]; // Largeur de l'image
$imgHeight = $infoImg[1]; // Hauteur de l'image $imgHeight = $infoImg[1]; // Hauteur de l'image
$exif = exif_read_data($filetoread);
$ort = false; $ort = false;
if (function_exists('exif_read_data')) {
$exif = exif_read_data($filetoread);
if ($exif && !empty($exif['Orientation'])) { if ($exif && !empty($exif['Orientation'])) {
$ort = $exif['Orientation']; $ort = $exif['Orientation'];
} }
}
if ($maxWidth == -1) $maxWidth=$infoImg[0]; // If size is -1, we keep unchanged if ($maxWidth == -1) $maxWidth=$infoImg[0]; // If size is -1, we keep unchanged
if ($maxHeight == -1) $maxHeight=$infoImg[1]; // If size is -1, we keep unchanged if ($maxHeight == -1) $maxHeight=$infoImg[1]; // If size is -1, we keep unchanged
@ -529,11 +530,13 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
$extImg = '.bmp'; $extImg = '.bmp';
break; break;
} }
if (! is_resource($img)) if (! is_resource($img))
{ {
dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING); dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING);
return 0; return 0;
} }
$exifAngle = false; $exifAngle = false;
if ($ort && !empty($conf->global->MAIN_USE_EXIF_ROTATION)) { if ($ort && !empty($conf->global->MAIN_USE_EXIF_ROTATION)) {
switch($ort) switch($ort)
@ -580,8 +583,6 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
} }
} }
// Initialisation des dimensions de la vignette si elles sont superieures a l'original // Initialisation des dimensions de la vignette si elles sont superieures a l'original
if ($maxWidth > $imgWidth) { $maxWidth = $imgWidth; } if ($maxWidth > $imgWidth) { $maxWidth = $imgWidth; }
if ($maxHeight > $imgHeight) { $maxHeight = $imgHeight; } if ($maxHeight > $imgHeight) { $maxHeight = $imgHeight; }

View File

@ -134,7 +134,7 @@ function showOnlinePaymentUrl($type, $ref)
global $langs; global $langs;
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('payment', 'paybox')); $langs->loadLangs(array('payment', 'stripe'));
$servicename = $langs->transnoentitiesnoconv('Online'); $servicename = $langs->transnoentitiesnoconv('Online');

View File

@ -594,7 +594,7 @@ class modProduct extends DolibarrModules
$this->import_fields_array[$r] = array(//field order as per structure of table llx_product_fournisseur_price, without optional fields $this->import_fields_array[$r] = array(//field order as per structure of table llx_product_fournisseur_price, without optional fields
'sp.fk_product'=>"ProductOrService*", 'sp.fk_product'=>"ProductOrService*",
'sp.fk_soc' => "Supplier*", 'sp.fk_soc' => "Supplier*",
'sp.ref_fourn' => 'SupplierRef', 'sp.ref_fourn' => 'SupplierRef*',
'sp.quantity' => "QtyMin*", 'sp.quantity' => "QtyMin*",
'sp.tva_tx' => 'VATRate', 'sp.tva_tx' => 'VATRate',
'sp.default_vat_code' => 'VATCode', 'sp.default_vat_code' => 'VATCode',

View File

@ -563,7 +563,7 @@ class modService extends DolibarrModules
$this->import_fields_array[$r] = array(//field order as per structure of table llx_product_fournisseur_price, without optional fields $this->import_fields_array[$r] = array(//field order as per structure of table llx_product_fournisseur_price, without optional fields
'sp.fk_product'=>"ProductOrService*", 'sp.fk_product'=>"ProductOrService*",
'sp.fk_soc' => "Supplier*", 'sp.fk_soc' => "Supplier*",
'sp.ref_fourn' => 'SupplierRef', 'sp.ref_fourn' => 'SupplierRef*',
'sp.quantity' => "QtyMin*", 'sp.quantity' => "QtyMin*",
'sp.tva_tx' => 'VATRate', 'sp.tva_tx' => 'VATRate',
'sp.default_vat_code' => 'VATCode', 'sp.default_vat_code' => 'VATCode',

View File

@ -250,6 +250,8 @@ OneLinePerUser=One line per user
ServiceToUseOnLines=Service to use on lines ServiceToUseOnLines=Service to use on lines
InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project
ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets).
ProjectFollowOpportunity=Follow opportunity
ProjectFollowTasks=Follow tasks
UsageOpportunity=Usage: Opportunity UsageOpportunity=Usage: Opportunity
UsageTasks=Usage: Tasks UsageTasks=Usage: Tasks
UsageBillTimeShort=Usage: Bill time UsageBillTimeShort=Usage: Bill time

View File

@ -56,7 +56,7 @@ NoPageYet=No pages yet
YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template
SyntaxHelp=Help on specific syntax tips SyntaxHelp=Help on specific syntax tips
YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor. YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor.
YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br> YouCanEditHtmlSource=<br><span class="fa fa-bug"></span> You can include PHP code into this source using tags <strong>&lt;?php ?&gt;</strong>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs.<br><br><span class="fa fa-bug"></span> You can also include content of another Page/Container with the following syntax:<br><strong>&lt;?php includeContainer('alias_of_container_to_include'); ?&gt;</strong><br><br><span class="fa fa-bug"></span> You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):<br><strong>&lt;?php redirectToContainer('alias_of_container_to_redirect_to'); ?&gt;</strong><br><br><span class="fa fa-link"></span> To add a link to another page, use the syntax:<br><strong>&lt;a href="alias_of_page_to_link_to.php"&gt;mylink&lt;a&gt;</strong><br><br><span class="fa fa-download"></span> To include a <strong>link to download</strong> a file stored into the <strong>documents</strong> directory, use the <strong>document.php</strong> wrapper:<br>Example, for a file into documents/ecm (need to be logged), syntax is:<br><strong>&lt;a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file into documents/medias (open directory for public access), syntax is:<br><strong>&lt;a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext"&gt;</strong><br>For a file shared with a share link (open access using the sharing hash key of file), syntax is:<br><strong>&lt;a href="/document.php?hashp=publicsharekeyoffile"&gt;</strong><br><br><span class="fa fa-picture-o"></span> To include an <strong>image</strong> stored into the <strong>documents</strong> directory, use the <strong>viewimage.php</strong> wrapper:<br>Example, for an image into documents/medias (open directory for public access), syntax is:<br><strong>&lt;img src="/viewimage.php?modulepart=medias&amp;file=[relative_dir/]filename.ext"&gt;</strong><br><br>More examples of HTML or dynamic code available on <a href="%s" target="_blank">the wiki documentation</a><br>.
ClonePage=Clone page/container ClonePage=Clone page/container
CloneSite=Clone site CloneSite=Clone site
SiteAdded=Website added SiteAdded=Website added

View File

@ -554,21 +554,21 @@ if ($action == 'create' && $user->rights->projet->creer)
print '<td>'; print '<td>';
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{ {
print '<input type="checkbox" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> '; print '<input type="checkbox" id="usage_opportunity" name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
$htmltext = $langs->trans("ProjectFollowOpportunity"); $htmltext = $langs->trans("ProjectFollowOpportunity");
print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
print '<br>'; print '<br>';
} }
if (empty($conf->global->PROJECT_HIDE_TASKS)) if (empty($conf->global->PROJECT_HIDE_TASKS))
{ {
print '<input type="checkbox" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> '; print '<input type="checkbox" id="usage_task" name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ' checked="checked"').'"> ';
$htmltext = $langs->trans("ProjectFollowTasks"); $htmltext = $langs->trans("ProjectFollowTasks");
print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
print '<br>'; print '<br>';
} }
if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
{ {
print '<input type="checkbox" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> '; print '<input type="checkbox" id="usage_bill_time" name="usage_bill_time"'.(GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '').'"> ';
$htmltext = $langs->trans("ProjectBillTimeDescription"); $htmltext = $langs->trans("ProjectBillTimeDescription");
print $form->textwithpicto($langs->trans("BillTime"), $htmltext); print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
print '<br>'; print '<br>';
@ -597,7 +597,7 @@ if ($action == 'create' && $user->rights->projet->creer)
print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1); print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1);
} }
else print $text; else print $text;
if (!GETPOSTISSET('backtopage')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; if (!GETPOSTISSET('backtopage')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td></tr>'; print '</td></tr>';
} }
@ -712,6 +712,20 @@ if ($action == 'create' && $user->rights->projet->creer)
jQuery("#opp_status").change(function() { jQuery("#opp_status").change(function() {
change_percent(); change_percent();
}); });
jQuery("#usage_task").change(function() {
console.log("We click on usage task "+jQuery("#usage_task").is(":checked"));
if (! jQuery("#usage_task").is(":checked")) {
jQuery("#usage_bill_time").prop("checked", false);
}
});
jQuery("#usage_bill_time").change(function() {
console.log("We click on usage to bill time");
if (jQuery("#usage_bill_time").is(":checked")) {
jQuery("#usage_task").prop("checked", true);
}
});
}); });
</script>'; </script>';
} }

View File

@ -1030,7 +1030,7 @@ while ($i < min($num, $limit))
print '<tr class="oddeven"'; print '<tr class="oddeven"';
if ($contextpage == 'poslist') if ($contextpage == 'poslist')
{ {
$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Bar or Restaurant
print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.$place.'\'"'; print ' onclick="location.href=\'list.php?action=change&contextpage=poslist&idcustomer='.$obj->rowid.'&place='.$place.'\'"';
} }
print '>'; print '>';
@ -1220,14 +1220,14 @@ while ($i < min($num, $limit))
} }
if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) if (($obj->client == 2 || $obj->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{ {
if ($s) $s .= " / "; if ($s) $s .= ", ";
$companystatic->name = $langs->trans("Prospect"); $companystatic->name = $langs->trans("Prospect");
$companystatic->name_alias = ''; $companystatic->name_alias = '';
$s .= $companystatic->getNomUrl(0, 'prospect', 0, 1); $s .= $companystatic->getNomUrl(0, 'prospect', 0, 1);
} }
if ((!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) && $obj->fournisseur) if ((!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) && $obj->fournisseur)
{ {
if ($s) $s .= " / "; if ($s) $s .= ", ";
$companystatic->name = $langs->trans("Supplier"); $companystatic->name = $langs->trans("Supplier");
$companystatic->name_alias = ''; $companystatic->name_alias = '';
$s .= $companystatic->getNomUrl(0, 'supplier', 0, 1); $s .= $companystatic->getNomUrl(0, 'supplier', 0, 1);

View File

@ -4017,6 +4017,11 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
.calendarviewcontainertr { height: 100px; } .calendarviewcontainertr { height: 100px; }
td.cal_other_month {
opacity: 0.8;
}
/* ============================================================================== */ /* ============================================================================== */
/* Ajax - Liste deroulante de l'autocompletion */ /* Ajax - Liste deroulante de l'autocompletion */

View File

@ -67,7 +67,7 @@ $colorbacklinepairhover = '230,237,244'; // line hover
$colorbacklinepairchecked = '230,237,244'; // line checked $colorbacklinepairchecked = '230,237,244'; // line checked
$colorbacklinebreak = '233,228,230'; // line break $colorbacklinebreak = '233,228,230'; // line break
$colorbackbody = '255,255,255'; $colorbackbody = '255,255,255';
$colortexttitlenotab = '140,80,10'; // 140,80,10 or 10,140,80 $colortexttitlenotab = '0,103,111'; // 140,80,10 or 10,140,80
$colortexttitle = '0,0,0'; $colortexttitle = '0,0,0';
$colortext = '0,0,0'; $colortext = '0,0,0';
$colortextlink = '10, 20, 100'; $colortextlink = '10, 20, 100';
@ -108,7 +108,7 @@ $badgeStatus0 = '#cbd3d3';
$badgeStatus1 = '#bc9526'; $badgeStatus1 = '#bc9526';
$badgeStatus2 = '#e6f0f0'; $badgeStatus2 = '#e6f0f0';
$badgeStatus3 = '#bca52b'; $badgeStatus3 = '#bca52b';
$badgeStatus4 = '#277d1e'; $badgeStatus4 = '#55a590';
$badgeStatus5 = '#cad2d2'; $badgeStatus5 = '#cad2d2';
$badgeStatus6 = '#cad2d2'; $badgeStatus6 = '#cad2d2';
$badgeStatus7 = '#baa32b'; $badgeStatus7 = '#baa32b';

View File

@ -4156,6 +4156,11 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; }
background-size: 24px auto; background-size: 24px auto;
} }
td.cal_other_month {
opacity: 0.8;
}
/* ============================================================================== */ /* ============================================================================== */
/* Ajax - Liste deroulante de l'autocompletion */ /* Ajax - Liste deroulante de l'autocompletion */
/* ============================================================================== */ /* ============================================================================== */

View File

@ -75,7 +75,7 @@ $object = new Ticket($db);
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$diroutputmassaction = $conf->ticket->dir_output.'/temp/massgeneration/'.$user->id; $diroutputmassaction = $conf->ticket->dir_output.'/temp/massgeneration/'.$user->id;
if ($socid > 0) $hookmanager->initHooks(array('thirdpartyticket')); if ($socid > 0) $hookmanager->initHooks(array('thirdpartyticket'));
elseif ($project > 0) $hookmanager->initHooks(array('projectticket')); elseif ($projectid > 0) $hookmanager->initHooks(array('projectticket'));
else $hookmanager->initHooks(array('ticketlist')); else $hookmanager->initHooks(array('ticketlist'));
// Fetch optionals attributes and labels // Fetch optionals attributes and labels
$extrafields->fetch_name_optionals_label($object->table_element); $extrafields->fetch_name_optionals_label($object->table_element);
@ -149,6 +149,8 @@ if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
$parameters = array(); $parameters = array();
if ($socid > 0) $parameters['socid'] = $socid;
if ($projectid > 0) $parameters['projectid'] = $projectid;
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

View File

@ -1034,6 +1034,8 @@ class User extends CommonObject
*/ */
public function setCategories($categories) public function setCategories($categories)
{ {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$type_categ = Categorie::TYPE_USER; $type_categ = Categorie::TYPE_USER;
// Handle single category // Handle single category
@ -1042,7 +1044,6 @@ class User extends CommonObject
} }
// Get current categories // Get current categories
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$c = new Categorie($this->db); $c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_categ, 'id'); $existing = $c->containing($this->id, $type_categ, 'id');
@ -1106,9 +1107,9 @@ class User extends CommonObject
} }
// If contact, remove link // If contact, remove link
if ($this->contact_id) if ($this->contactid > 0 || $this->contact_id > 0)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".$this->contact_id; $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET fk_user_creat = null WHERE rowid = ".(($this->contactid > 0) ? $this->contactid : $this->contact_id);
if (!$error && !$this->db->query($sql)) if (!$error && !$this->db->query($sql))
{ {
$error++; $error++;

View File

@ -2452,7 +2452,9 @@ if (!GETPOST('hide_websitemenu'))
print '<span class="websitehelp">'; print '<span class="websitehelp">';
if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha')) if (GETPOST('editsource', 'alpha') || GETPOST('editcontent', 'alpha'))
{ {
$htmltext = $langs->transnoentitiesnoconv("YouCanEditHtmlSource").'<br>'; $url = 'https://wiki.dolibarr.org/index.php/Module_Website';
$htmltext = $langs->transnoentitiesnoconv("YouCanEditHtmlSource", $url).'<br>';
if ($conf->browser->layout == 'phone') if ($conf->browser->layout == 'phone')
{ {
print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution'); print $form->textwithpicto('', $htmltext, 1, 'help', 'inline-block', 1, 2, 'tooltipsubstitution');