Merge remote-tracking branch 'origin/3.5' into develop
Conflicts: htdocs/compta/facture.php htdocs/core/modules/modAgenda.class.php htdocs/core/modules/modProduct.class.php htdocs/fourn/commande/liste.php
This commit is contained in:
commit
b7f55ea99c
@ -124,7 +124,12 @@ Fix: [ bug #1362 ] Note is not saved.
|
|||||||
Fix: tr/td balance.
|
Fix: tr/td balance.
|
||||||
Fix: [ bug #1360 ] note indicator for member tab.
|
Fix: [ bug #1360 ] note indicator for member tab.
|
||||||
Fix: Nb of notes and doc not visible onto tasks.
|
Fix: Nb of notes and doc not visible onto tasks.
|
||||||
Fix: [ bug #1372 ] Margin calculation does not work in proposals
|
Fix: [ bug #1372 ] Margin calculation does not work in proposals.
|
||||||
|
Fix: [ bug #1381 ] PHP Warning when listing stock transactions page.
|
||||||
|
Fix: [ bug #1367 ] "Show invoice" link after a POS sell throws an error.
|
||||||
|
Fix: TCPDF error file not found in member card generation.
|
||||||
|
Fix: [ bug #1380 ] Customer invoices are not grouped in company results report.
|
||||||
|
Fix: [ bug #1393 ] PHP Warning when creating a supplier invoice.
|
||||||
|
|
||||||
***** ChangeLog for 3.5.2 compared to 3.5.1 *****
|
***** ChangeLog for 3.5.2 compared to 3.5.1 *****
|
||||||
Fix: Can't add user for a task.
|
Fix: Can't add user for a task.
|
||||||
|
|||||||
@ -603,7 +603,7 @@ upload_max_filesize = 2M
|
|||||||
;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
|
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
|
||||||
allow_url_fopen = Off
|
allow_url_fopen = On
|
||||||
|
|
||||||
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
|
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
|
||||||
allow_url_include = Off
|
allow_url_include = Off
|
||||||
|
|||||||
@ -210,6 +210,15 @@ if ($search_user > 0)
|
|||||||
|
|
||||||
|
|
||||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder.', p.ref DESC';
|
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder.', p.ref DESC';
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql.= $db->plimit($limit + 1,$offset);
|
$sql.= $db->plimit($limit + 1,$offset);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
|
|
||||||
@ -236,7 +245,7 @@ if ($result)
|
|||||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
||||||
if ($search_author) $param.='&search_author='.$search_author;
|
if ($search_author) $param.='&search_author='.$search_author;
|
||||||
if ($search_town) $param.='&search_town='.$search_town;
|
if ($search_town) $param.='&search_town='.$search_town;
|
||||||
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|||||||
@ -2541,7 +2541,7 @@ class Commande extends CommonOrder
|
|||||||
$this->nbtodo=$this->nbtodolate=0;
|
$this->nbtodo=$this->nbtodolate=0;
|
||||||
$clause = " WHERE";
|
$clause = " WHERE";
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.date_creation as datec, c.fk_statut";
|
$sql = "SELECT c.rowid, c.date_creation as datec, c.date_livraison as delivery_date, c.fk_statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
if (!$user->rights->societe->client->voir && !$user->societe_id)
|
||||||
{
|
{
|
||||||
@ -2560,7 +2560,9 @@ class Commande extends CommonOrder
|
|||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->nbtodo++;
|
$this->nbtodo++;
|
||||||
if ($obj->fk_statut != 3 && $this->db->jdate($obj->datec) < ($now - $conf->commande->client->warning_delay)) $this->nbtodolate++;
|
|
||||||
|
$date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date;
|
||||||
|
if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->client->warning_delay)) $this->nbtodolate++;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -200,6 +200,15 @@ if ($search_user > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql.= $db->plimit($limit + 1,$offset);
|
$sql.= $db->plimit($limit + 1,$offset);
|
||||||
|
|
||||||
//print $sql;
|
//print $sql;
|
||||||
@ -245,7 +254,7 @@ if ($resql)
|
|||||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
|
|||||||
@ -1659,19 +1659,19 @@ else if ($action == 'builddoc') // En get ou en post
|
|||||||
if (GETPOST('fk_bank'))
|
if (GETPOST('fk_bank'))
|
||||||
$object->fk_bank = GETPOST('fk_bank');
|
$object->fk_bank = GETPOST('fk_bank');
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$newlang = '';
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id'))
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id');
|
||||||
$newlang = GETPOST('lang_id');
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang;
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
|
if (! empty($newlang))
|
||||||
$newlang = $object->client->default_lang;
|
{
|
||||||
if (! empty($newlang)) {
|
|
||||||
$outputlangs = new Translate("", $conf);
|
$outputlangs = new Translate("", $conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
$result = facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$result = facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
if ($result <= 0) {
|
if ($result <= 0)
|
||||||
|
{
|
||||||
dol_print_error($db, $result);
|
dol_print_error($db, $result);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -231,6 +231,15 @@ $sql.= ' ORDER BY ';
|
|||||||
$listfield=explode(',',$sortfield);
|
$listfield=explode(',',$sortfield);
|
||||||
foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.$sortorder.',';
|
foreach ($listfield as $key => $value) $sql.= $listfield[$key].' '.$sortorder.',';
|
||||||
$sql.= ' f.rowid DESC ';
|
$sql.= ' f.rowid DESC ';
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql.= $db->plimit($limit+1,$offset);
|
$sql.= $db->plimit($limit+1,$offset);
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
@ -255,7 +264,7 @@ if ($resql)
|
|||||||
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
||||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
||||||
if ($search_montant_ttc) $param.='&search_montant_ttc='.$search_montant_ttc;
|
if ($search_montant_ttc) $param.='&search_montant_ttc='.$search_montant_ttc;
|
||||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->nom:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->nom:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
|
|||||||
@ -188,7 +188,7 @@ else
|
|||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||||
$sql.= " GROUP BY s.nom, s.rowid";
|
$sql.= " GROUP BY s.nom, s.rowid";
|
||||||
$sql.= " ORDER BY s.nom";
|
$sql.= " ORDER BY s.nom, s.rowid";
|
||||||
|
|
||||||
dol_syslog("get customer invoices sql=".$sql);
|
dol_syslog("get customer invoices sql=".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
@ -282,11 +282,11 @@ print '</tr>';
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Frais, factures fournisseurs.
|
* Suppliers invoices
|
||||||
*/
|
*/
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom, s.rowid as socid, date_format(f.datef,'%Y-%m') as dm, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
$sql = "SELECT s.nom, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
|
$sql.= ", ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||||
$sql.= " WHERE f.fk_soc = s.rowid";
|
$sql.= " WHERE f.fk_soc = s.rowid";
|
||||||
@ -300,7 +300,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT s.nom, s.rowid as socid, date_format(p.datep,'%Y-%m') as dm, sum(pf.amount) as amount_ttc";
|
$sql = "SELECT s.nom, s.rowid as socid, sum(pf.amount) as amount_ttc";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."paiementfourn as p";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf";
|
$sql.= ", ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||||
@ -313,7 +313,7 @@ else
|
|||||||
}
|
}
|
||||||
$sql.= " AND f.entity = ".$conf->entity;
|
$sql.= " AND f.entity = ".$conf->entity;
|
||||||
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
||||||
$sql .= " GROUP BY s.nom, s.rowid, dm";
|
$sql .= " GROUP BY s.nom, s.rowid";
|
||||||
$sql .= " ORDER BY s.nom, s.rowid";
|
$sql .= " ORDER BY s.nom, s.rowid";
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
|
||||||
@ -373,11 +373,11 @@ print '</tr>';
|
|||||||
* Charges sociales non deductibles
|
* Charges sociales non deductibles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->trans("Type").' 0)</td></tr>';
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.libelle as nom, sum(cs.amount) as amount";
|
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||||
$sql.= " WHERE cs.fk_type = c.id";
|
$sql.= " WHERE cs.fk_type = c.id";
|
||||||
@ -387,7 +387,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.libelle as nom, sum(p.amount) as amount";
|
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||||
@ -398,8 +398,8 @@ else
|
|||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||||
}
|
}
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle";
|
$sql.= " GROUP BY c.libelle, c.id";
|
||||||
$sql.= " ORDER BY c.libelle";
|
$sql.= " ORDER BY c.libelle, c.id";
|
||||||
|
|
||||||
dol_syslog("get social contributions deductible=0 sql=".$sql);
|
dol_syslog("get social contributions deductible=0 sql=".$sql);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
@ -447,11 +447,11 @@ print '</tr>';
|
|||||||
* Charges sociales deductibles
|
* Charges sociales deductibles
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("SocialContributions").' ('.$langs->trans("Type").' 1)</td></tr>';
|
||||||
|
|
||||||
if ($modecompta == 'CREANCES-DETTES')
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.libelle as nom, sum(cs.amount) as amount";
|
$sql = "SELECT c.id, c.libelle as nom, sum(cs.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||||
$sql.= " WHERE cs.fk_type = c.id";
|
$sql.= " WHERE cs.fk_type = c.id";
|
||||||
@ -459,12 +459,12 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle";
|
$sql.= " GROUP BY c.libelle, c.id";
|
||||||
$sql.= " ORDER BY c.libelle";
|
$sql.= " ORDER BY c.libelle, c.id";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT c.libelle as nom, sum(p.amount) as amount";
|
$sql = "SELECT c.id, c.libelle as nom, sum(p.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
$sql.= ", ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||||
@ -474,8 +474,8 @@ else
|
|||||||
if (! empty($date_start) && ! empty($date_end))
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||||
$sql.= " AND cs.entity = ".$conf->entity;
|
$sql.= " AND cs.entity = ".$conf->entity;
|
||||||
$sql.= " GROUP BY c.libelle";
|
$sql.= " GROUP BY c.libelle, c.id";
|
||||||
$sql.= " ORDER BY c.libelle";
|
$sql.= " ORDER BY c.libelle, c.id";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog("get social contributions deductible=1 sql=".$sql);
|
dol_syslog("get social contributions deductible=1 sql=".$sql);
|
||||||
@ -542,6 +542,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
|||||||
/*
|
/*
|
||||||
* VAT
|
* VAT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<tr><td colspan="4">'.$langs->trans("VAT").'</td></tr>';
|
print '<tr><td colspan="4">'.$langs->trans("VAT").'</td></tr>';
|
||||||
$subtotal_ht = 0;
|
$subtotal_ht = 0;
|
||||||
$subtotal_ttc = 0;
|
$subtotal_ttc = 0;
|
||||||
@ -565,12 +566,15 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
|
|
||||||
dol_syslog("get vat to pay sql=".$sql);
|
dol_syslog("get vat to pay sql=".$sql);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result) {
|
if ($result)
|
||||||
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$var=false;
|
$var=false;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num) {
|
if ($num)
|
||||||
while ($i < $num) {
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$amount -= $obj->amount;
|
$amount -= $obj->amount;
|
||||||
@ -607,12 +611,15 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
|
|
||||||
dol_syslog("get vat received back sql=".$sql);
|
dol_syslog("get vat received back sql=".$sql);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result) {
|
if ($result)
|
||||||
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
$var=true;
|
$var=true;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($num) {
|
if ($num)
|
||||||
while ($i < $num) {
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$amount += $obj->amount;
|
$amount += $obj->amount;
|
||||||
@ -635,7 +642,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TVA reellement deja payee
|
// VAT really already paid
|
||||||
$amount=0;
|
$amount=0;
|
||||||
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
|
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
|
||||||
@ -676,7 +683,7 @@ else
|
|||||||
print "<td align=\"right\">".price($amount)."</td>\n";
|
print "<td align=\"right\">".price($amount)."</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// TVA recuperee
|
// VAT really received
|
||||||
$amount=0;
|
$amount=0;
|
||||||
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
|
$sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
|
||||||
|
|||||||
@ -161,9 +161,12 @@ class pdf_standard
|
|||||||
|
|
||||||
// Define photo
|
// Define photo
|
||||||
$dir=$conf->adherent->dir_output;
|
$dir=$conf->adherent->dir_output;
|
||||||
$file=get_exdir($idmember,2).'photos/'.$photo;
|
if (! empty($photo))
|
||||||
$photo=$dir.'/'.$file;
|
{
|
||||||
if (empty($photo) || ! is_readable($photo)) $photo='';
|
$file=get_exdir($idmember,2).'photos/'.$photo;
|
||||||
|
$photo=$dir.'/'.$file;
|
||||||
|
if (! is_readable($photo)) $photo='';
|
||||||
|
}
|
||||||
|
|
||||||
// Define background image
|
// Define background image
|
||||||
$backgroundimage='';
|
$backgroundimage='';
|
||||||
|
|||||||
@ -361,25 +361,31 @@ class modAgenda extends DolibarrModules
|
|||||||
|
|
||||||
// Exports
|
// Exports
|
||||||
//--------
|
//--------
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town',
|
$r=0;
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->export_label[$r]="ExportDataset_event1";
|
||||||
|
$this->export_permission[$r]=array(array("agenda","export"));
|
||||||
|
$this->export_fields_array[$r]=array('ac.id'=>"ActionId",'ac.ref_ext'=>"ExternalRef",'ac.datec'=>"ActionDateCreation",'ac.datep'=>"DateActionBegin",
|
||||||
|
'ac.datep2'=>"DateActionEnd",'ac.label'=>"Title",'ac.note'=>"Note",'ac.percent'=>"Percent",'ac.durationp'=>"durationp",
|
||||||
|
'cac.libelle'=>"ActionType",
|
||||||
|
's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town',
|
||||||
'cp.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4',
|
'cp.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4',
|
||||||
's.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra',
|
's.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra');
|
||||||
'ac.id'=>"ActionId",'ac.ref_ext'=>"ExternalRef",'ac.datec'=>"ActionDateCreation",'ac.datep'=>"DateActionBegin",
|
$this->export_TypeFields_array[$r]=array('ac.ref_ext'=>"Text",'ac.datec'=>"Date",'ac.datep'=>"Date",
|
||||||
'ac.datep2'=>"DateActionEnd",'ac.label'=>"Label",'ac.note'=>"Note",'ac.percent'=>"Percent",'ac.durationp'=>"durationp",
|
|
||||||
'cac.libelle'=>"ActionType");
|
|
||||||
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text',
|
|
||||||
'cp.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text',
|
|
||||||
's.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text',
|
|
||||||
'ac.ref_ext'=>"Text",'ac.datec'=>"Date",'ac.datep'=>"Date",
|
|
||||||
'ac.datep2'=>"Date",'ac.label'=>"Text",'ac.note'=>"Text",'ac.percent'=>"Number",
|
'ac.datep2'=>"Date",'ac.label'=>"Text",'ac.note'=>"Text",'ac.percent'=>"Number",
|
||||||
'ac.durationp'=>"Duree",
|
'ac.durationp'=>"Duree",
|
||||||
'cac.libelle'=>"List:c_actioncomm:libelle:rowid");
|
'cac.libelle'=>"List:c_actioncomm:libelle:rowid",
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company',
|
's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text',
|
||||||
'cp.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company',
|
'cp.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text',
|
||||||
's.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company',
|
's.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text');
|
||||||
'ac.id'=>"action",'ac.ref_ext'=>"action",'ac.datec'=>"action",'ac.datep'=>"action",
|
$this->export_entities_array[$r]=array('ac.id'=>"action",'ac.ref_ext'=>"action",'ac.datec'=>"action",'ac.datep'=>"action",
|
||||||
'ac.datep2'=>"action",'ac.label'=>"action",'ac.note'=>"action",'ac.percent'=>"action",'ac.durationp'=>"action",
|
'ac.datep2'=>"action",'ac.label'=>"action",'ac.note'=>"action",'ac.percent'=>"action",'ac.durationp'=>"action",
|
||||||
'cac.libelle'=>"action");
|
'cac.libelle'=>"action",
|
||||||
|
's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company',
|
||||||
|
'cp.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company',
|
||||||
|
's.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company',);
|
||||||
|
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'actioncomm as ac';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'actioncomm as ac';
|
||||||
|
|||||||
@ -214,15 +214,15 @@ class modProduct extends DolibarrModules
|
|||||||
$this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
$this->export_label[$r]="ProductsMultiPrice"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
$this->export_permission[$r]=array(array("produit","export"));
|
$this->export_permission[$r]=array(array("produit","export"));
|
||||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",
|
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",
|
||||||
'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
|
'pr.price_base_type'=>"PriceBase",'pr.price_level'=>"PriceLevel",
|
||||||
'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
|
'pr.price'=>"HT",'pr.price_ttc'=>"TTC",
|
||||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
'pr.price_min'=>"MinPriceHT",'pr.price_min_ttc'=>"MinPriceTTC",
|
||||||
'pr.tva_tx'=>'PriceLevelVATRate',
|
'pr.tva_tx'=>'VATRate',
|
||||||
'pr.date_price'=>'DateCreation');
|
'pr.date_price'=>'DateCreation');
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
||||||
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
||||||
'pr.price_ttc'=>"product",
|
'pr.price_ttc'=>"product",
|
||||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
'pr.price_min'=>"product",'pr.price_min_ttc'=>"product",
|
||||||
'pr.tva_tx'=>'product',
|
'pr.tva_tx'=>'product',
|
||||||
'pr.date_price'=>"product");
|
'pr.date_price'=>"product");
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
@ -302,11 +302,11 @@ class modProduct extends DolibarrModules
|
|||||||
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
$this->import_tables_array[$r]=array('pr'=>MAIN_DB_PREFIX.'product_price');
|
$this->import_tables_array[$r]=array('pr'=>MAIN_DB_PREFIX.'product_price');
|
||||||
$this->import_tables_creator_array[$r]=array('pr'=>'fk_user_author'); // Fields to store import user id
|
$this->import_tables_creator_array[$r]=array('pr'=>'fk_user_author'); // Fields to store import user id
|
||||||
$this->import_fields_array[$r]=array('pr.fk_product'=>"ProductRowid*",
|
$this->import_fields_array[$r]=array('pr.fk_product'=>"Id*",
|
||||||
'pr.price_base_type'=>"PriceLevelPriceBase",'pr.price_level'=>"PriceLevel",
|
'pr.price_base_type'=>"PriceBase",'pr.price_level'=>"PriceLevel",
|
||||||
'pr.price'=>"PriceLevelUnitPriceHT",'pr.price_ttc'=>"PriceLevelUnitPriceTTC",
|
'pr.price'=>"HT",'pr.price_ttc'=>"TTC",
|
||||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
'pr.price_min'=>"MinPriceHT",'pr.price_min_ttc'=>"MinPriceTTC",
|
||||||
'pr.tva_tx'=>'PriceLevelVATRate',
|
'pr.tva_tx'=>'VATRate',
|
||||||
'pr.date_price'=>'DateCreation*');
|
'pr.date_price'=>'DateCreation*');
|
||||||
$this->import_regex_array[$r]=array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
|
$this->import_regex_array[$r]=array('pr.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
|
||||||
$this->import_examplevalues_array[$r]=array('pr.fk_product'=>"1",
|
$this->import_examplevalues_array[$r]=array('pr.fk_product'=>"1",
|
||||||
|
|||||||
@ -157,6 +157,12 @@ class pdf_standardlabel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define photo
|
||||||
|
if (! empty($photo))
|
||||||
|
{
|
||||||
|
if (! is_readable($photo)) $photo='';
|
||||||
|
}
|
||||||
|
|
||||||
// Define background image
|
// Define background image
|
||||||
$backgroundimage='';
|
$backgroundimage='';
|
||||||
|
|
||||||
|
|||||||
@ -94,7 +94,8 @@ $entitytolang = array(
|
|||||||
'shipment_line'=> 'ShipmentLine',
|
'shipment_line'=> 'ShipmentLine',
|
||||||
'project' => 'Projects',
|
'project' => 'Projects',
|
||||||
'projecttask' => 'Tasks',
|
'projecttask' => 'Tasks',
|
||||||
'task_time' => 'TaskTimeSpent'
|
'task_time' => 'TaskTimeSpent',
|
||||||
|
'action' => 'Action'
|
||||||
);
|
);
|
||||||
|
|
||||||
$array_selected=isset($_SESSION["export_selected_fields"])?$_SESSION["export_selected_fields"]:array();
|
$array_selected=isset($_SESSION["export_selected_fields"])?$_SESSION["export_selected_fields"]:array();
|
||||||
|
|||||||
@ -130,6 +130,14 @@ if ($search_status >= 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -146,7 +154,7 @@ if ($resql)
|
|||||||
if ($search_ttc) $param.="&search_ttc=".$search_ttc;
|
if ($search_ttc) $param.="&search_ttc=".$search_ttc;
|
||||||
if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
|
if ($search_refsupp) $param.="&search_refsupp=".$search_refsupp;
|
||||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -451,6 +451,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
|
|||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
|
$outputlangs = $langs;
|
||||||
$result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$result=supplier_invoice_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
@ -1333,7 +1334,10 @@ if ($action == 'create')
|
|||||||
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
|
print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">';
|
||||||
|
|
||||||
$txt=$langs->trans($classname);
|
$txt=$langs->trans($classname);
|
||||||
if ($classname=='CommandeFournisseur') $txt=$langs->trans("SupplierOrder");
|
if ($classname=='CommandeFournisseur') {
|
||||||
|
$langs->load('orders');
|
||||||
|
$txt=$langs->trans("SupplierOrder");
|
||||||
|
}
|
||||||
print '<tr><td>'.$txt.'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$txt.'</td><td colspan="2">'.$objectsrc->getNomUrl(1).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>';
|
print '<tr><td>'.$langs->trans('TotalHT').'</td><td colspan="2">'.price($objectsrc->total_ht).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
|
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
|
||||||
|
|||||||
@ -169,6 +169,14 @@ if (GETPOST("search_montant_ttc"))
|
|||||||
$sql .= " AND fac.total_ttc = '".$db->escape(price2num(GETPOST("search_montant_ttc")))."'";
|
$sql .= " AND fac.total_ttc = '".$db->escape(price2num(GETPOST("search_montant_ttc")))."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
$sql.= $db->plimit($limit+1, $offset);
|
||||||
|
|
||||||
@ -193,7 +201,7 @@ if ($resql)
|
|||||||
if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht"));
|
if (GETPOST("search_montant_ht")) $param.='&search_montant_ht='.urlencode(GETPOST("search_montant_ht"));
|
||||||
if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc"));
|
if (GETPOST("search_montant_ttc")) $param.='&search_montant_ttc='.urlencode(GETPOST("search_montant_ttc"));
|
||||||
|
|
||||||
print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -8,7 +8,7 @@ ImportableDatas=Importable dataset
|
|||||||
SelectExportDataSet=Choose dataset you want to export...
|
SelectExportDataSet=Choose dataset you want to export...
|
||||||
SelectImportDataSet=Choose dataset you want to import...
|
SelectImportDataSet=Choose dataset you want to import...
|
||||||
SelectExportFields=Choose fields you want to export, or select a predefined export profile
|
SelectExportFields=Choose fields you want to export, or select a predefined export profile
|
||||||
SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profil:
|
SelectImportFields=Choose source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile:
|
||||||
NotImportedFields=Fields of source file not imported
|
NotImportedFields=Fields of source file not imported
|
||||||
SaveExportModel=Save this export profile if you plan to reuse it later...
|
SaveExportModel=Save this export profile if you plan to reuse it later...
|
||||||
SaveImportModel=Save this import profile if you plan to reuse it later...
|
SaveImportModel=Save this import profile if you plan to reuse it later...
|
||||||
@ -81,7 +81,7 @@ DoNotImportFirstLine=Do not import first line of source file
|
|||||||
NbOfSourceLines=Number of lines in source file
|
NbOfSourceLines=Number of lines in source file
|
||||||
NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "<b>%s</b>" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)...
|
NowClickToTestTheImport=Check import parameters you have defined. If they are correct, click on button "<b>%s</b>" to launch a simulation of import process (no data will be changed in your database, it's only a simulation for the moment)...
|
||||||
RunSimulateImportFile=Launch the import simulation
|
RunSimulateImportFile=Launch the import simulation
|
||||||
FieldNeedSource=This fiels in database require a data from source file
|
FieldNeedSource=This field requires data from the source file
|
||||||
SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file
|
SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file
|
||||||
InformationOnSourceFile=Information on source file
|
InformationOnSourceFile=Information on source file
|
||||||
InformationOnTargetTables=Information on target fields
|
InformationOnTargetTables=Information on target fields
|
||||||
|
|||||||
@ -70,6 +70,8 @@ PublicPrice=Public price
|
|||||||
CurrentPrice=Current price
|
CurrentPrice=Current price
|
||||||
NewPrice=New price
|
NewPrice=New price
|
||||||
MinPrice=Minim. selling price
|
MinPrice=Minim. selling price
|
||||||
|
MinPriceHT=Minim. selling price (net of tax)
|
||||||
|
MinPriceTTC=Minim. selling price (inc. tax)
|
||||||
CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount.
|
CantBeLessThanMinPrice=The selling price can't be lower than minimum allowed for this product (%s without tax). This message can also appears if you type a too important discount.
|
||||||
ContractStatus=Contract status
|
ContractStatus=Contract status
|
||||||
ContractStatusClosed=Closed
|
ContractStatusClosed=Closed
|
||||||
|
|||||||
@ -245,7 +245,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
|
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
|
||||||
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
|
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
|
||||||
}
|
}
|
||||||
print '<tr '.$bc[$var].' style="border-top: 1px solid #ccc; font-weight: bold">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan=4>'.$langs->trans('TotalMargin')."</td>";
|
print '<td colspan=4>'.$langs->trans('TotalMargin')."</td>";
|
||||||
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||||
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||||
|
|||||||
@ -232,7 +232,7 @@ if ($socid > 0)
|
|||||||
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
|
$marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):'';
|
||||||
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
|
$markRate = ($cumul_vente != 0)?(100 * $totalMargin / $cumul_vente):'';
|
||||||
}
|
}
|
||||||
print '<tr '.$bc[$var].' style="border-top: 1px solid #ccc; font-weight: bold">';
|
print '<tr class="liste_total">';
|
||||||
print '<td colspan=2>'.$langs->trans('TotalMargin')."</td>";
|
print '<td colspan=2>'.$langs->trans('TotalMargin')."</td>";
|
||||||
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
print "<td align=\"right\">".price($cumul_vente, null, null, null, null, $rounding)."</td>\n";
|
||||||
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
print "<td align=\"right\">".price($cumul_achat, null, null, null, null, $rounding)."</td>\n";
|
||||||
|
|||||||
@ -188,6 +188,14 @@ else
|
|||||||
$sql.= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte";
|
$sql.= " p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte";
|
||||||
$sql .= ', p.desiredstock';
|
$sql .= ', p.desiredstock';
|
||||||
//if (GETPOST("toolowstock")) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet
|
//if (GETPOST("toolowstock")) $sql.= " HAVING SUM(s.reel) < p.seuil_stock_alerte"; // Not used yet
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
|
{
|
||||||
|
$result = $db->query($sql);
|
||||||
|
$nbtotalofrecords = $db->num_rows($result);
|
||||||
|
}
|
||||||
|
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit + 1, $offset);
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
@ -228,7 +236,8 @@ else
|
|||||||
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
||||||
$param.=($search_categ?"&search_categ=".$search_categ:"");
|
$param.=($search_categ?"&search_categ=".$search_categ:"");
|
||||||
$param.=isset($type)?"&type=".$type:"";
|
$param.=isset($type)?"&type=".$type:"";
|
||||||
print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
|
|
||||||
|
print_barre_liste($texte, $page, "liste.php", $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords);
|
||||||
|
|
||||||
if (! empty($catid))
|
if (! empty($catid))
|
||||||
{
|
{
|
||||||
@ -500,7 +509,7 @@ else
|
|||||||
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
$param.=($fourn_id?"&fourn_id=".$fourn_id:"");
|
||||||
$param.=($search_categ?"&search_categ=".$search_categ:"");
|
$param.=($search_categ?"&search_categ=".$search_categ:"");
|
||||||
$param.=isset($type)?"&type=".$type:"";
|
$param.=isset($type)?"&type=".$type:"";
|
||||||
print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num);
|
print_barre_liste('', $page, "liste.php", $param, $sortfield, $sortorder,'',$num,$nbtotalofrecords);
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
|
|||||||
@ -529,7 +529,7 @@ if ($resql)
|
|||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
// Add number of product when there is a filter on period
|
// Add number of product when there is a filter on period
|
||||||
if (count($arrayofuniqueproduct) == 1)
|
if (count($arrayofuniqueproduct) == 1 && is_numeric($year))
|
||||||
{
|
{
|
||||||
$productidselected=0;
|
$productidselected=0;
|
||||||
foreach ($arrayofuniqueproduct as $key => $val)
|
foreach ($arrayofuniqueproduct as $key => $val)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user