diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 549de2afaeb..d6ce54a20e9 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -355,7 +355,7 @@ if ($rowid && $action != 'edit') { if (!empty($bankline->rappro) || empty($bankline)) { print '
'.$langs->trans("Modify")."
"; } else { - print '
".$langs->trans("Modify")."
"; + print '
'.$langs->trans("Modify")."
"; } } diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c665166b0af..27b9a05181b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -893,19 +893,19 @@ if ($search_status <> '') { if ($search_status == 1 && empty($conf->expedition->enabled)) { $sql .= ' AND c.fk_statut IN (1,2)'; // If module expedition disabled, we include order with status 'sending in process' into 'validated' } else { - $sql .= ' AND c.fk_statut = '.((int) $search_status); // brouillon, validee, en cours, annulee + $sql .= ' AND c.fk_statut = '.((int) $search_status); // draft, validated, in process or canceled } } - if ($search_status == -2) { // To process + if ($search_status == -2) { // "validated + in process" //$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0'; - $sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected + $sql .= " AND (c.fk_statut IN (1,2))"; } - if ($search_status == -3) { // To bill + if ($search_status == -3) { // "validated + in process + delivered" //$sql.= ' AND c.fk_statut in (1,2,3)'; //$sql.= ' AND c.facture = 0'; // invoice not created - $sql .= ' AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))'; // validated, in process or closed but not billed + $sql .= ' AND (c.fk_statut IN (1,2,3))'; // validated, in process or closed } - if ($search_status == -4) { // "validate and in progress" + if ($search_status == -4) { // "validate + in progress" $sql .= ' AND (c.fk_statut IN (1,2))'; // validated, in process } } diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index b668880e9d3..7809e894af8 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -119,7 +119,13 @@ if ($action == 'confirm_rejet') { * View */ -$invoicestatic = new Facture($db); +if ($type == 'bank-transfer') { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $invoicestatic = new FactureFournisseur($db); +} else { + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $invoicestatic = new Facture($db); +} $title = $langs->trans("WithdrawalsLine"); if ($type == 'bank-transfer') { @@ -318,7 +324,11 @@ if ($id) { print ''.$obj->ref."\n"; } - print ''; + if ($type == 'bank-transfer') { + print ''; + } else { + print ''; + } print img_object($langs->trans("ShowCompany"), "company").' '.$obj->name."\n"; print ''.price($obj->total_ttc)."\n"; diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index 93acb2ab463..8efae5a836d 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -377,7 +377,7 @@ if ($sql_select) { $num = $db->num_rows($resql); - $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element); + $param = "&socid=".urlencode($socid)."&type_element=".urlencode($type_element)."&id=".urlencode($id); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index fd6e9aa6efb..73a8b86ea47 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1124,6 +1124,9 @@ class ExtraFields continue; } + $valarray = explode('|', $val); + $val = $valarray[0]; + if ($langfile && $val) { $options[$okey] = $langs->trans($val); } else { diff --git a/htdocs/product/stats/facturerec.php b/htdocs/product/stats/facturerec.php index b09e572763a..d1bbfe54e57 100644 --- a/htdocs/product/stats/facturerec.php +++ b/htdocs/product/stats/facturerec.php @@ -156,7 +156,7 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).''; } elseif ($user->rights->facture->lire) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; - $sql .= "f.titre, f.datec, f.rowid as facid,"; + $sql .= "f.titre, f.datec, f.rowid as facid, f.suspended as suspended,"; $sql .= " d.rowid, d.total_ht as total_ht, d.qty"; // We must keep the d.rowid here to not loose record because of the distinct used to ignore duplicate line when link on societe_commerciaux is used if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; @@ -251,7 +251,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datec", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.suspended", "", $option, 'align="right"', $sortfield, $sortorder); print "\n"; if ($num > 0) { @@ -280,7 +280,7 @@ if ($id > 0 || !empty($ref)) { print dol_print_date($db->jdate($objp->datec), 'dayhour').""; print ''.$objp->qty."\n"; print ''.price($objp->total_ht)."\n"; - print ''.$invoicestatic->LibStatut($objp->paye, $objp->statut, 5, $paiement, $objp->type).''; + print ''.$invoicestatic->LibStatut(1, $objp->suspended, 5, $paiement, $objp->type).''; print "\n"; $i++; } diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 2bfede4b28b..7db91569a8d 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -918,7 +918,7 @@ if ($action == 'create') { if ($objectsrc->fetch_optionals() > 0) { $recept->array_options = array_merge($recept->array_options, $objectsrc->array_options); } - print $object->showOptionals($extrafields, 'create', $parameters); + print $recept->showOptionals($extrafields, 'create', $parameters); } // Incoterms