Fix: use getDocumentsLink method
This commit is contained in:
parent
4220229573
commit
be13602c71
@ -251,19 +251,19 @@ if (! empty($categ[$categidx]))
|
|||||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
|
||||||
{
|
{
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$categidx='expdev';
|
$categidx='expdev';
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||||
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
||||||
$head[$h][2] = 'expdev';
|
$head[$h][2] = 'expdev';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$categidx='marketplace';
|
$categidx='marketplace';
|
||||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||||
$head[$h][1] = $langs->trans("ModulesMarketPlaces");
|
$head[$h][1] = $langs->trans("ModulesMarketPlaces");
|
||||||
$head[$h][2] = 'marketplace';
|
$head[$h][2] = 'marketplace';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $mode, $langs->trans("Modules"));
|
dol_fiche_head($head, $mode, $langs->trans("Modules"));
|
||||||
|
|
||||||
|
|||||||
@ -516,7 +516,7 @@ if ($conf->propal->enabled && $user->rights->propal->lire)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
@ -257,7 +257,7 @@ if ($resql)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -334,7 +334,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -418,7 +418,7 @@ if ($conf->propal->enabled)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -490,7 +490,7 @@ if ($conf->propal->enabled)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -320,8 +320,7 @@ if ($result)
|
|||||||
$filename=dol_sanitizeFileName($objp->ref);
|
$filename=dol_sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid;
|
||||||
//$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||||
print $formfile->getDocumentsLink('propal', $filename, $filedir);
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
if ($objp->client == 1)
|
if ($objp->client == 1)
|
||||||
|
|||||||
@ -3140,7 +3140,7 @@ class OrderLine
|
|||||||
$sql.= " , total_ht=".price2num($this->total_ht)."";
|
$sql.= " , total_ht=".price2num($this->total_ht)."";
|
||||||
$sql.= " , total_tva=".price2num($this->total_tva)."";
|
$sql.= " , total_tva=".price2num($this->total_tva)."";
|
||||||
$sql.= " , total_ttc=".price2num($this->total_ttc)."";
|
$sql.= " , total_ttc=".price2num($this->total_ttc)."";
|
||||||
$sql.= " , total_localtax1=".price2num($this->total_localtax1);
|
$sql.= " , total_localtax1=".price2num($this->total_localtax1);
|
||||||
$sql.= " , total_localtax2=".price2num($this->total_localtax2);
|
$sql.= " , total_localtax2=".price2num($this->total_localtax2);
|
||||||
}
|
}
|
||||||
$sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?$this->fk_fournprice:"null");
|
$sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?$this->fk_fournprice:"null");
|
||||||
|
|||||||
@ -262,7 +262,7 @@ if ($resql)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -331,7 +331,7 @@ if ($conf->commande->enabled)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -402,7 +402,7 @@ if ($conf->commande->enabled)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -308,7 +308,7 @@ if ($resql)
|
|||||||
$filename=dol_sanitizeFileName($objp->ref);
|
$filename=dol_sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -469,10 +469,10 @@ if ($action == 'create')
|
|||||||
while ($i < $n)
|
while ($i < $n)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="orders_to_invoice[]" value="'.$orders_id[$i].'">';
|
print '<input type="hidden" name="orders_to_invoice[]" value="'.$orders_id[$i].'">';
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
// Button "Create Draft"
|
// Button "Create Draft"
|
||||||
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
|
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
|
||||||
@ -496,7 +496,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
||||||
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
|
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
@ -535,18 +535,18 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
{
|
{
|
||||||
$sql.= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')";
|
$sql.= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Date filter
|
//Date filter
|
||||||
if ($date_start && $date_end) $sql.= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'";
|
if ($date_start && $date_end) $sql.= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'";
|
||||||
if ($date_starty && $date_endy) $sql.= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'";
|
if ($date_starty && $date_endy) $sql.= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'";
|
||||||
|
|
||||||
if (!empty($sref_client))
|
if (!empty($sref_client))
|
||||||
{
|
{
|
||||||
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
|
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
|
||||||
}
|
}
|
||||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($socid)
|
if ($socid)
|
||||||
@ -569,7 +569,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
print '<h3>';
|
print '<h3>';
|
||||||
$companystatic->id=$socid;
|
$companystatic->id=$socid;
|
||||||
$companystatic->nom=$soc->nom;
|
$companystatic->nom=$soc->nom;
|
||||||
|
|
||||||
print $companystatic->getNomUrl(1,'customer');
|
print $companystatic->getNomUrl(1,'customer');
|
||||||
print '</h3>';
|
print '</h3>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -581,7 +581,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
print_liste_field_titre($langs->trans('Status'),'','','','','align="right"');
|
print_liste_field_titre($langs->trans('Status'),'','','','','align="right"');
|
||||||
print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"');
|
print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"');
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="get" action="orderstoinvoice.php">';
|
print '<form method="get" action="orderstoinvoice.php">';
|
||||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||||
@ -593,88 +593,88 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
//print '<td class="liste_titre">';
|
//print '<td class="liste_titre">';
|
||||||
print '<td class="liste_titre" align="left">';
|
print '<td class="liste_titre" align="left">';
|
||||||
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
|
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
|
||||||
|
|
||||||
//DATE ORDER
|
//DATE ORDER
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print $period;
|
print $period;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//DATE DELIVERY
|
//DATE DELIVERY
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print $periodely;
|
print $periodely;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//SEARCH BUTTON
|
//SEARCH BUTTON
|
||||||
print '</td><td align="right" class="liste_titre">';
|
print '</td><td align="right" class="liste_titre">';
|
||||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
|
|
||||||
//ALL/NONE
|
//ALL/NONE
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
|
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print '<form name="orders2invoice" action="orderstoinvoice.php" method="GET">';
|
print '<form name="orders2invoice" action="orderstoinvoice.php" method="GET">';
|
||||||
$var=True;
|
$var=True;
|
||||||
$generic_commande = new Commande($db);
|
$generic_commande = new Commande($db);
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
|
|
||||||
$generic_commande->id=$objp->rowid;
|
$generic_commande->id=$objp->rowid;
|
||||||
$generic_commande->ref=$objp->ref;
|
$generic_commande->ref=$objp->ref;
|
||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td class="nobordernopadding" nowrap="nowrap">';
|
print '<td class="nobordernopadding" nowrap="nowrap">';
|
||||||
print $generic_commande->getNomUrl(1,$objp->fk_statut);
|
print $generic_commande->getNomUrl(1,$objp->fk_statut);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($objp->ref);
|
$filename=dol_sanitizeFileName($objp->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td>'.$objp->ref_client.'</td>';
|
print '<td>'.$objp->ref_client.'</td>';
|
||||||
|
|
||||||
// Order date
|
// Order date
|
||||||
print '<td align="center" nowrap>';
|
print '<td align="center" nowrap>';
|
||||||
print dol_print_date($db->jdate($objp->date_commande),'day');
|
print dol_print_date($db->jdate($objp->date_commande),'day');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//Delivery date
|
//Delivery date
|
||||||
print '<td align="center" nowrap>';
|
print '<td align="center" nowrap>';
|
||||||
print dol_print_date($db->jdate($objp->date_livraison),'day');
|
print dol_print_date($db->jdate($objp->date_livraison),'day');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<td align="right" nowrap="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
|
print '<td align="right" nowrap="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
|
||||||
|
|
||||||
// Checkbox
|
// Checkbox
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">';
|
print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">';
|
||||||
print '</td>' ;
|
print '</td>' ;
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$total = $total + $objp->price;
|
$total = $total + $objp->price;
|
||||||
$subtotal = $subtotal + $objp->price;
|
$subtotal = $subtotal + $objp->price;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3446,7 +3446,7 @@ class FactureLigne
|
|||||||
$sql.= ",total_ht=".price2num($this->total_ht)."";
|
$sql.= ",total_ht=".price2num($this->total_ht)."";
|
||||||
$sql.= ",total_tva=".price2num($this->total_tva)."";
|
$sql.= ",total_tva=".price2num($this->total_tva)."";
|
||||||
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
||||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
||||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
||||||
}
|
}
|
||||||
$sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'";
|
$sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'";
|
||||||
|
|||||||
@ -301,10 +301,10 @@ if ($action == 'create')
|
|||||||
$prodprice=$product_static->price; // price HT
|
$prodprice=$product_static->price; // price HT
|
||||||
print '<td align="right">'.price($prodprice)."</td>\n";
|
print '<td align="right">'.price($prodprice)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|||||||
@ -340,7 +340,7 @@ if ($resql)
|
|||||||
print '<td width="16" align="right" class="nobordernopadding">';
|
print '<td width="16" align="right" class="nobordernopadding">';
|
||||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
||||||
$foundpdf=$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1,$param);
|
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
@ -365,8 +365,10 @@ if ($resql)
|
|||||||
|
|
||||||
// Checkbox
|
// Checkbox
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($foundpdf) print '<input id="cb'.$objp->facid.'" class="flat checkformerge" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
|
if (! empty($formfile->numoffiles))
|
||||||
else print ' ';
|
print '<input id="cb'.$objp->facid.'" class="flat checkformerge" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
|
||||||
|
else
|
||||||
|
print ' ';
|
||||||
print '</td>' ;
|
print '</td>' ;
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -341,7 +341,7 @@ if ($resql)
|
|||||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->facid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->facid;
|
||||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -320,7 +320,7 @@ print '</td>';
|
|||||||
print '<td valign="top" width="70%" class="notopnoleftnoright">';
|
print '<td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
// Last modified customer invoices
|
// Last modified customer invoices
|
||||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
$langs->load("boxes");
|
$langs->load("boxes");
|
||||||
$facstatic=new Facture($db);
|
$facstatic=new Facture($db);
|
||||||
@ -378,7 +378,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
|||||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -709,7 +709,7 @@ if ($conf->tax->enabled && $user->rights->tax->charges->lire)
|
|||||||
/*
|
/*
|
||||||
* Customers orders to be billed
|
* Customers orders to be billed
|
||||||
*/
|
*/
|
||||||
if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->commande->lire)
|
if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||||
{
|
{
|
||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
@ -770,7 +770,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -813,7 +813,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
|||||||
/*
|
/*
|
||||||
* Unpaid customers invoices
|
* Unpaid customers invoices
|
||||||
*/
|
*/
|
||||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||||
{
|
{
|
||||||
$facstatic=new Facture($db);
|
$facstatic=new Facture($db);
|
||||||
|
|
||||||
@ -853,7 +853,6 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
|||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td nowrap="nowrap">';
|
print '<td nowrap="nowrap">';
|
||||||
|
|
||||||
@ -871,7 +870,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
|||||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -25,9 +25,9 @@ $maxsizestring=255;
|
|||||||
$maxsizeint=10;
|
$maxsizeint=10;
|
||||||
|
|
||||||
$extrasize=GETPOST('size');
|
$extrasize=GETPOST('size');
|
||||||
if (GETPOST('type')=='double' && strpos($extrasize,',')===false) $extrasize='24,8';
|
if (GETPOST('type')=='double' && strpos($extrasize,',')===false) $extrasize='24,8';
|
||||||
if (GETPOST('type')=='date') $extrasize='';
|
if (GETPOST('type')=='date') $extrasize='';
|
||||||
if (GETPOST('type')=='datetime') $extrasize='';
|
if (GETPOST('type')=='datetime') $extrasize='';
|
||||||
|
|
||||||
|
|
||||||
// Add attribute
|
// Add attribute
|
||||||
@ -38,10 +38,10 @@ if ($action == 'add')
|
|||||||
// Check values
|
// Check values
|
||||||
if (! GETPOST('type'))
|
if (! GETPOST('type'))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
|
$mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring)
|
if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring)
|
||||||
|
|||||||
@ -369,8 +369,8 @@ class Form
|
|||||||
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
|
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
|
||||||
$s="";
|
$s="";
|
||||||
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
|
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
|
||||||
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||||
if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').'</'.$tag.'>';
|
if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').'</'.$tag.'>';
|
||||||
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
|
||||||
if (empty($notabs)) $s.='</tr></table>';
|
if (empty($notabs)) $s.='</tr></table>';
|
||||||
|
|
||||||
|
|||||||
@ -199,9 +199,9 @@ class FormFile
|
|||||||
|
|
||||||
global $langs,$bc,$conf;
|
global $langs,$bc,$conf;
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
if (! empty($iconPDF)) {
|
if (! empty($iconPDF)) {
|
||||||
return $this->getDocumentsLink($modulepart, $filename, $filedir);
|
return $this->getDocumentsLink($modulepart, $filename, $filedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
$forname='builddoc';
|
$forname='builddoc';
|
||||||
@ -470,15 +470,15 @@ class FormFile
|
|||||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
$out.= '>';
|
$out.= '>';
|
||||||
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
$out.= img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
||||||
$out.= '</a>'."\n";
|
$out.= '</a>'."\n";
|
||||||
$out.= '</td>';
|
$out.= '</td>';
|
||||||
|
|
||||||
// Show file size
|
// Show file size
|
||||||
$size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"]));
|
$size=(! empty($file['size'])?$file['size']:dol_filesize($filedir."/".$file["name"]));
|
||||||
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size($size).'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_size($size).'</td>';
|
||||||
|
|
||||||
// Show file date
|
// Show file date
|
||||||
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
$date=(! empty($file['date'])?$file['date']:dol_filemtime($filedir."/".$file["name"]));
|
||||||
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour').'</td>';
|
$out.= '<td align="right" nowrap="nowrap">'.dol_print_date($date, 'dayhour').'</td>';
|
||||||
|
|
||||||
if ($delallowed)
|
if ($delallowed)
|
||||||
@ -526,35 +526,39 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
|
$this->numoffiles=0;
|
||||||
|
|
||||||
$file_list=dol_dir_list($filedir, 'files', 0, $filename.'.pdf', '\.meta$|\.png$');
|
$file_list=dol_dir_list($filedir, 'files', 0, $filename.'.pdf', '\.meta$|\.png$');
|
||||||
|
|
||||||
// For ajax treatment
|
// For ajax treatment
|
||||||
$out.= '<div id="gen_pdf_'.$filename.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n";
|
$out.= '<div id="gen_pdf_'.$filename.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n";
|
||||||
|
|
||||||
if (! empty($file_list))
|
if (! empty($file_list))
|
||||||
{
|
{
|
||||||
// Loop on each file found
|
// Loop on each file found
|
||||||
foreach($file_list as $file)
|
foreach($file_list as $file)
|
||||||
{
|
{
|
||||||
// Define relative path for download link (depends on module)
|
// Define relative path for download link (depends on module)
|
||||||
$relativepath=$file["name"]; // Cas general
|
$relativepath=$file["name"]; // Cas general
|
||||||
if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture...
|
if ($filename) $relativepath=$filename."/".$file["name"]; // Cas propal, facture...
|
||||||
// Autre cas
|
// Autre cas
|
||||||
if ($modulepart == 'donation') {
|
if ($modulepart == 'donation') {
|
||||||
$relativepath = get_exdir($filename,2).$file["name"];
|
$relativepath = get_exdir($filename,2).$file["name"];
|
||||||
}
|
}
|
||||||
if ($modulepart == 'export') {
|
if ($modulepart == 'export') {
|
||||||
$relativepath = $file["name"];
|
$relativepath = $file["name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show file name with link to download
|
// Show file name with link to download
|
||||||
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
$out.= '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||||
$mime=dol_mimetype($relativepath,'',0);
|
$mime=dol_mimetype($relativepath,'',0);
|
||||||
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
|
||||||
$out.= '>';
|
$out.= '>';
|
||||||
$out.= img_pdf($file["name"],2);
|
$out.= img_pdf($file["name"],2);
|
||||||
$out.= '</a>'."\n";
|
$out.= '</a>'."\n";
|
||||||
|
|
||||||
|
$this->numoffiles++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -739,12 +739,12 @@ function dol_format_address($object)
|
|||||||
}
|
}
|
||||||
else if (in_array($object->country_code,array('GB'))) // UK: title firstname name \n address lines \n town state \n zip \n country
|
else if (in_array($object->country_code,array('GB'))) // UK: title firstname name \n address lines \n town state \n zip \n country
|
||||||
{
|
{
|
||||||
$ret .= ($ret ? "\n" : '' ).$object->town;
|
$ret .= ($ret ? "\n" : '' ).$object->town;
|
||||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||||
{
|
{
|
||||||
$ret.=", ".$object->departement;
|
$ret.=", ".$object->departement;
|
||||||
}
|
}
|
||||||
if ($object->zip) $ret .= ($ret ? "\n" : '' ).$object->zip;
|
if ($object->zip) $ret .= ($ret ? "\n" : '' ).$object->zip;
|
||||||
}
|
}
|
||||||
else // Other: title firstname name \n address lines \n zip town \n country
|
else // Other: title firstname name \n address lines \n zip town \n country
|
||||||
{
|
{
|
||||||
|
|||||||
@ -56,16 +56,16 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
|
|||||||
$result=array();
|
$result=array();
|
||||||
|
|
||||||
// TODO Remove this code. Added for backward compatibility. To remove once localtaxX_type is provided by caller.
|
// TODO Remove this code. Added for backward compatibility. To remove once localtaxX_type is provided by caller.
|
||||||
if ($localtax1_type == '?')
|
if ($localtax1_type == '?')
|
||||||
{
|
{
|
||||||
if ($mysoc->country_code=='ES') $localtax1_type='1';
|
if ($mysoc->country_code=='ES') $localtax1_type='1';
|
||||||
else $localtax1_type='0';
|
else $localtax1_type='0';
|
||||||
}
|
}
|
||||||
if ($localtax2_type == '?')
|
if ($localtax2_type == '?')
|
||||||
{
|
{
|
||||||
if ($mysoc->country_code=='ES') $localtax2_type='1';
|
if ($mysoc->country_code=='ES') $localtax2_type='1';
|
||||||
else $localtax2_type='0';
|
else $localtax2_type='0';
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize total (may be HT or TTC depending on price_base_type)
|
// initialize total (may be HT or TTC depending on price_base_type)
|
||||||
$tot_sans_remise = $pu * $qty;
|
$tot_sans_remise = $pu * $qty;
|
||||||
@ -166,10 +166,10 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $localtax1
|
|||||||
$apply_tax = false;
|
$apply_tax = false;
|
||||||
|
|
||||||
//If price is 'TTC' we need to have the totals without VAT for a correct calculation
|
//If price is 'TTC' we need to have the totals without VAT for a correct calculation
|
||||||
if ($price_base_type=='TTC')
|
if ($price_base_type=='TTC')
|
||||||
{
|
{
|
||||||
$tot_sans_remise= price2num($tot_sans_remise / (1 + ($txtva / 100)),'MU');
|
$tot_sans_remise= price2num($tot_sans_remise / (1 + ($txtva / 100)),'MU');
|
||||||
$tot_avec_remise= price2num($tot_avec_remise / (1 + ($txtva / 100)),'MU');
|
$tot_avec_remise= price2num($tot_avec_remise / (1 + ($txtva / 100)),'MU');
|
||||||
}
|
}
|
||||||
|
|
||||||
switch($localtax1_type) {
|
switch($localtax1_type) {
|
||||||
|
|||||||
@ -162,7 +162,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$pagenb=0;
|
$pagenb=0;
|
||||||
$pdf->SetDrawColor(128,128,128);
|
$pdf->SetDrawColor(128,128,128);
|
||||||
|
|
||||||
$pdf->AliasNbPages();
|
$pdf->AliasNbPages();
|
||||||
|
|
||||||
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
$pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
|
||||||
$pdf->SetSubject($outputlangs->transnoentities("Sending"));
|
$pdf->SetSubject($outputlangs->transnoentities("Sending"));
|
||||||
@ -182,9 +182,9 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
$tab_top = 52;
|
$tab_top = 52;
|
||||||
$tab_top_newpage = 10;
|
$tab_top_newpage = 10;
|
||||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter;
|
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter;
|
||||||
$tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter;
|
$tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter;
|
||||||
|
|
||||||
$pdf->SetFillColor(240,240,240);
|
$pdf->SetFillColor(240,240,240);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@ -219,13 +219,13 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 3);
|
$pdf->SetFont('','', $default_font_size - 3);
|
||||||
|
|
||||||
//Creation des cases a cocher
|
//Creation des cases a cocher
|
||||||
$pdf->Rect(10+3, $curY, 3, 3);
|
$pdf->Rect(10+3, $curY, 3, 3);
|
||||||
$pdf->Rect(20+3, $curY, 3, 3);
|
$pdf->Rect(20+3, $curY, 3, 3);
|
||||||
//Insertion de la reference du produit
|
//Insertion de la reference du produit
|
||||||
$pdf->SetXY(30, $curY);
|
$pdf->SetXY(30, $curY);
|
||||||
$pdf->SetFont('','B', $default_font_size - 3);
|
$pdf->SetFont('','B', $default_font_size - 3);
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'L', 0);
|
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'L', 0);
|
||||||
|
|
||||||
$pdf->SetXY(140, $curY);
|
$pdf->SetXY(140, $curY);
|
||||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked, 0, 'C', 0);
|
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked, 0, 'C', 0);
|
||||||
@ -269,16 +269,16 @@ class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show square
|
// Show square
|
||||||
if ($pagenb == 1)
|
if ($pagenb == 1)
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 0);
|
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 0);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 0);
|
$this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 0);
|
||||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot + 1;
|
$bottomlasttab=$this->page_hauteur - $heightforinfotot + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pied de page
|
// Pied de page
|
||||||
|
|||||||
@ -240,10 +240,10 @@ class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
|
||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description is moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore) {
|
if ($pageposafter > $pageposbefore) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
|
|
||||||
|
|||||||
@ -243,8 +243,8 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
{
|
{
|
||||||
$curY = $nexY;
|
$curY = $nexY;
|
||||||
|
|
||||||
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
||||||
$pageposbefore=$pdf->getPage();
|
$pageposbefore=$pdf->getPage();
|
||||||
|
|
||||||
$pdf->SetFont('','B', $default_font_size - 1);
|
$pdf->SetFont('','B', $default_font_size - 1);
|
||||||
$pdf->SetXY($this->marge_gauche, $curY);
|
$pdf->SetXY($this->marge_gauche, $curY);
|
||||||
@ -273,16 +273,16 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
|
|
||||||
$nexY+=2; // Passe espace entre les lignes
|
$nexY+=2; // Passe espace entre les lignes
|
||||||
|
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
|
||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description is moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore) {
|
if ($pageposafter > $pageposbefore) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
|
|
||||||
// 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)
|
||||||
|
|||||||
@ -254,9 +254,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
|
||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description is moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore) {
|
if ($pageposafter > $pageposbefore) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
|
|||||||
@ -36,21 +36,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
|||||||
*/
|
*/
|
||||||
class pdf_azur extends ModelePDFPropales
|
class pdf_azur extends ModelePDFPropales
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
var $name;
|
var $name;
|
||||||
var $description;
|
var $description;
|
||||||
var $type;
|
var $type;
|
||||||
|
|
||||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||||
var $version = 'dolibarr';
|
var $version = 'dolibarr';
|
||||||
|
|
||||||
var $page_largeur;
|
var $page_largeur;
|
||||||
var $page_hauteur;
|
var $page_hauteur;
|
||||||
var $format;
|
var $format;
|
||||||
var $marge_gauche;
|
var $marge_gauche;
|
||||||
var $marge_droite;
|
var $marge_droite;
|
||||||
var $marge_haute;
|
var $marge_haute;
|
||||||
var $marge_basse;
|
var $marge_basse;
|
||||||
|
|
||||||
var $emetteur; // Objet societe qui emet
|
var $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description is moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore) {
|
if ($pageposafter > $pageposbefore) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
|
|
||||||
@ -1057,7 +1057,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetFillColor(230,230,230);
|
$pdf->SetFillColor(230,230,230);
|
||||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
|
||||||
// Show sender name
|
// Show sender name
|
||||||
$pdf->SetXY($posx+2,$posy+3);
|
$pdf->SetXY($posx+2,$posy+3);
|
||||||
|
|||||||
@ -273,10 +273,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->setPage($pageposbefore);
|
$pdf->setPage($pageposbefore);
|
||||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||||
|
|
||||||
// We suppose that a too long description is moved completely on next page
|
// We suppose that a too long description is moved completely on next page
|
||||||
if ($pageposafter > $pageposbefore) {
|
if ($pageposafter > $pageposbefore) {
|
||||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||||
|
|
||||||
|
|||||||
@ -348,7 +348,7 @@ if ($resql)
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -416,7 +416,7 @@ print '<td width="16" align="right" class="nobordernopadding">';
|
|||||||
$filename=dol_sanitizeFileName($obj->ref);
|
$filename=dol_sanitizeFileName($obj->ref);
|
||||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT. '/user/class/usergroup.class.php';
|
|||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("holiday");
|
$langs->load("holiday");
|
||||||
|
|
||||||
// Si pas administrateur
|
// Si pas administrateur
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|||||||
@ -248,7 +248,7 @@ print '</form>';
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|||||||
@ -37,8 +37,8 @@ $extrafields = new ExtraFields($db);
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
// List of supported format
|
// List of supported format
|
||||||
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
|
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
|
||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'alpha');
|
$action=GETPOST('action', 'alpha');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user