Merge branch '10.0' into fixsizewithff
This commit is contained in:
commit
448cd1cd36
@ -1065,7 +1065,7 @@ if ($object->id > 0)
|
|||||||
print '<table class="noborder centpercent lastrecordtable">';
|
print '<table class="noborder centpercent lastrecordtable">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").' <span class="badge">'.$num.'</span></a></td>';
|
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LatestCustomerTemplateInvoices", ($num<=$MAXLIST?"":$MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/compta/facture/invoicetemplate_list.php?socid='.$object->id.'">'.$langs->trans("AllCustomerTemplateInvoices").' <span class="badge">'.$num.'</span></a></td>';
|
||||||
print '</tr></table></td>';
|
print '</tr></table></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,8 @@ $cancel = GETPOST('cancel', 'alpha');
|
|||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'invoicetemplatelist'; // To manage different context of search
|
$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'invoicetemplatelist'; // To manage different context of search
|
||||||
|
|
||||||
|
$socid = GETPOST('socid', 'int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id=(GETPOST('facid', 'int')?GETPOST('facid', 'int'):GETPOST('id', 'int'));
|
$id=(GETPOST('facid', 'int')?GETPOST('facid', 'int'):GETPOST('id', 'int'));
|
||||||
$lineid=GETPOST('lineid', 'int');
|
$lineid=GETPOST('lineid', 'int');
|
||||||
@ -141,6 +143,11 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($socid > 0) {
|
||||||
|
$tmpthirdparty = new Societe($db);
|
||||||
|
$res = $tmpthirdparty->fetch($socid);
|
||||||
|
if ($res > 0) $search_societe = $tmpthirdparty->name;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -378,8 +378,8 @@ else
|
|||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($resql);
|
||||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||||
{
|
{
|
||||||
$page = 0;
|
$page = 0;
|
||||||
@ -389,14 +389,14 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if (! $result)
|
if (! $resql)
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
$arrayofselected=is_array($toselect)?$toselect:array();
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
@ -763,7 +763,7 @@ $i = 0;
|
|||||||
$totalarray=array();
|
$totalarray=array();
|
||||||
while ($i < min($num, $limit))
|
while ($i < min($num, $limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
@ -980,7 +980,7 @@ while ($i < min($num, $limit))
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free($result);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
|||||||
@ -1840,7 +1840,6 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
|
|||||||
}
|
}
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if ($object->lines[$i]->special_code == 3) return '';
|
|
||||||
if (empty($hidedetails) || $hidedetails > 1) $result.=$langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
|
if (empty($hidedetails) || $hidedetails > 1) $result.=$langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@ -131,6 +131,21 @@ if ($action == 'presend')
|
|||||||
{
|
{
|
||||||
$formmail->fromid = $user->id;
|
$formmail->fromid = $user->id;
|
||||||
}
|
}
|
||||||
|
if ($object->element === 'facture' && !empty($conf->global->INVOICE_EMAIL_SENDER)) {
|
||||||
|
$formmail->frommail = $conf->global->INVOICE_EMAIL_SENDER;
|
||||||
|
$formmail->fromname = '';
|
||||||
|
$formmail->fromtype = 'special';
|
||||||
|
}
|
||||||
|
if ($object->element === 'shipping' && !empty($conf->global->SHIPPING_EMAIL_SENDER)) {
|
||||||
|
$formmail->frommail = $conf->global->SHIPPING_EMAIL_SENDER;
|
||||||
|
$formmail->fromname = '';
|
||||||
|
$formmail->fromtype = 'special';
|
||||||
|
}
|
||||||
|
if ($object->element === 'commande' && !empty($conf->global->COMMANDE_EMAIL_SENDER)) {
|
||||||
|
$formmail->frommail = $conf->global->COMMANDE_EMAIL_SENDER;
|
||||||
|
$formmail->fromname = '';
|
||||||
|
$formmail->fromtype = 'special';
|
||||||
|
}
|
||||||
$formmail->trackid=$trackid;
|
$formmail->trackid=$trackid;
|
||||||
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set
|
||||||
{
|
{
|
||||||
|
|||||||
@ -321,10 +321,10 @@ class Expedition extends CommonObject
|
|||||||
$sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:"null");
|
$sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:"null");
|
||||||
$sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:"null");
|
$sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:"null");
|
||||||
$sql.= ", '".$this->db->escape($this->tracking_number)."'";
|
$sql.= ", '".$this->db->escape($this->tracking_number)."'";
|
||||||
$sql.= ", ".$this->weight;
|
$sql.= ", ".(is_numeric($this->weight)?$this->weight:'NULL');
|
||||||
$sql.= ", ".$this->sizeS; // TODO Should use this->trueDepth
|
$sql.= ", ".(is_numeric($this->sizeS)?$this->sizeS:'NULL'); // TODO Should use this->trueDepth
|
||||||
$sql.= ", ".$this->sizeW; // TODO Should use this->trueWidth
|
$sql.= ", ".(is_numeric($this->sizeW)?$this->sizeW:'NULL'); // TODO Should use this->trueWidth
|
||||||
$sql.= ", ".$this->sizeH; // TODO Should use this->trueHeight
|
$sql.= ", ".(is_numeric($this->sizeH)?$this->sizeH:'NULL'); // TODO Should use this->trueHeight
|
||||||
$sql.= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL');
|
$sql.= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL');
|
||||||
$sql.= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL');
|
$sql.= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL');
|
||||||
$sql.= ", ".(!empty($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
|
$sql.= ", ".(!empty($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
|
||||||
|
|||||||
@ -208,7 +208,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("DatePropal", $_SERVER["PHP_SELF"], "p.datep", "", $option, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("DatePropal", $_SERVER["PHP_SELF"], "p.datep", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "p.total", "", $option, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user