Merge remote-tracking branch 'origin/3.4' into develop
This commit is contained in:
commit
a1a8fac25c
@ -55,7 +55,7 @@ $specimenthirdparty->initAsSpecimen();
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconstorder=GETPOST('maskconstorder','alpha');
|
||||
$maskvalue=GETPOST('maskvalue','alpha');
|
||||
$maskvalue=GETPOST('maskorder','alpha');
|
||||
|
||||
if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskvalue,'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
@ -888,7 +888,7 @@ if ($id > 0)
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterweek" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -897,7 +897,7 @@ if ($id > 0)
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '</form>'."\n";
|
||||
print '<form name="listactionsfilterday" action="'.DOL_URL_ROOT.'/comm/action/index.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -906,7 +906,7 @@ if ($id > 0)
|
||||
print '<input type="hidden" name="month" value="'.dol_print_date($act->datep,'%m').'">';
|
||||
print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
//print '<input type="hidden" name="day" value="'.dol_print_date($act->datep,'%d').'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" style="min-width: 120px" class="button" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '</form>'."\n";
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -115,13 +115,13 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
|
||||
|
||||
// Buttons
|
||||
print '<td align="center" valign="middle" class="nowrap">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewcal" value="'.$langs->trans("ViewCal").'">';
|
||||
print '<br>';
|
||||
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
|
||||
print '<br>';
|
||||
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewday" value="'.$langs->trans("ViewDay").'">';
|
||||
print '<br>';
|
||||
print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' <input type="submit" class="button" style="width:120px" name="viewlist" value="'.$langs->trans("ViewList").'">';
|
||||
print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewlist" value="'.$langs->trans("ViewList").'">';
|
||||
print '</td>';
|
||||
|
||||
// Legend
|
||||
|
||||
@ -135,6 +135,8 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique');
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane');
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion');
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte');
|
||||
|
||||
|
||||
-- Provinces Belgium (id country=2)
|
||||
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers');
|
||||
|
||||
@ -381,3 +381,6 @@ ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255) AFTER fk_user;
|
||||
ALTER TABLE llx_fichinterdet ADD COLUMN fk_parent_line integer NULL AFTER fk_fichinter;
|
||||
|
||||
ALTER TABLE llx_societe_address CHANGE COLUMN tel phone varchar(20);
|
||||
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1);
|
||||
|
||||
|
||||
@ -638,16 +638,16 @@ $formproduct = new FormProduct($db);
|
||||
|
||||
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
{
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
if (empty($object->error) && $id)
|
||||
{
|
||||
$object = new Product($db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result <= 0) dol_print_error('',$object->error);
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
// -----------------------------------------
|
||||
// When used with CANVAS
|
||||
// -----------------------------------------
|
||||
if (empty($object->error) && $id)
|
||||
{
|
||||
$object = new Product($db);
|
||||
$result=$object->fetch($id);
|
||||
if ($result <= 0) dol_print_error('',$object->error);
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
$objcanvas->display_canvas($action); // Show template
|
||||
}
|
||||
else
|
||||
@ -1315,8 +1315,9 @@ print "\n</div><br>\n";
|
||||
|
||||
if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
{
|
||||
print '<table width="100%" class="noborder">';
|
||||
//print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
//Variable used to check if any text is going to be printed
|
||||
$html = '';
|
||||
//print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
// Propals
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->creer)
|
||||
@ -1325,42 +1326,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("propal");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherProposals").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherprop = $propal->liste_array(2,1,0);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherprop) && count($otherprop))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addinpropal">';
|
||||
print $langs->trans("Proposals").'</td><td colspan="2">';
|
||||
print $form->selectarray("propalid", $otherprop, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addinpropal">';
|
||||
$html .= $langs->trans("Proposals").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("propalid", $otherprop, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherOpenedPropals");
|
||||
print '</td></tr>';
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherOpenedPropals");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// Commande
|
||||
@ -1370,42 +1371,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("orders");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$othercom = $commande->liste_array(2, 1, null);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($othercom) && count($othercom))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addincommande">';
|
||||
print $langs->trans("Orders").'</td><td colspan="2">';
|
||||
print $form->selectarray("commandeid", $othercom, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addincommande">';
|
||||
$html .= $langs->trans("Orders").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("commandeid", $othercom, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherOpenedOrders");
|
||||
print '</td></tr>';
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherOpenedOrders");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
// Factures
|
||||
@ -1415,47 +1416,52 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherinvoice = $invoice->liste_array(2, 1, null);
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherinvoice) && count($otherinvoice))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
print '<input type="hidden" name="action" value="addinfacture">';
|
||||
print $langs->trans("Invoice").'</td><td colspan="2">';
|
||||
print $form->selectarray("factureid", $otherinvoice, 0, 1);
|
||||
print '</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
print '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
print '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[!$var]."><td>";
|
||||
print $langs->trans("NoOtherDraftBills");
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html .= '<tr class="liste_titre">';
|
||||
$html .= '<td class="liste_titre">'.$langs->trans("AddToOtherOrders").'</td>';
|
||||
$html .= '</tr><tr>';
|
||||
$html .= '<td valign="top">';
|
||||
|
||||
$var=true;
|
||||
$otherinvoice = $invoice->liste_array(2, 1, null);
|
||||
$html .= '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
$html .= '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$html .= '<table class="nobordernopadding" width="100%">';
|
||||
if (is_array($otherinvoice) && count($otherinvoice))
|
||||
{
|
||||
$var=!$var;
|
||||
$html .= '<tr '.$bc[$var].'><td style="width: 200px;">';
|
||||
$html .= '<input type="hidden" name="action" value="addinfacture">';
|
||||
$html .= $langs->trans("Invoice").'</td><td colspan="2">';
|
||||
$html .= $form->selectarray("factureid", $otherinvoice, 0, 1);
|
||||
$html .= '</td></tr>';
|
||||
$html .= '<tr '.$bc[$var].'><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||
$html .= '</td><td align="right">';
|
||||
$html .= '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$html .= "<tr ".$bc[!$var]."><td>";
|
||||
$html .= $langs->trans("NoOtherDraftBills");
|
||||
$html .= '</td></tr>';
|
||||
}
|
||||
$html .= '</table>';
|
||||
$html .= '</form>';
|
||||
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
//If any text is going to be printed, then we show the table
|
||||
if (!empty($html))
|
||||
{
|
||||
print '<table width="100%" class="noborder">';
|
||||
print $html;
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user