diff --git a/ChangeLog b/ChangeLog index 53dde2583f0..d2073f601e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -137,9 +137,9 @@ Fix: Link product, In list view and label product. Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to. Fix: When disabled, all fields to add time into task line must be disabled. Fix: Missing include files.lib.php in some pages that use dol_delete_recursive -Fix: Missing include files.lib.php in some pages ti use dol_delete_recursive. Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref. Fix: [ bug #1553 ] Saving User displays setup removes menu. +Fix: [ bug #1544 ] Can remove date from invoice ***** ChangeLog for 3.5.4 compared to 3.5.3 ***** Fix: Hide title of event when agenda module disabled. diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 02f6a7f0741..e1739457849 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011 Jean Heimburger @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU *General Public License as published by + * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * @@ -291,6 +291,13 @@ class Commande extends CommonOrder } } + // Set new ref and current status + if (! $error) + { + $this->ref = $num; + $this->statut = 1; + } + if (! $error) { // Appel des triggers @@ -301,13 +308,6 @@ class Commande extends CommonOrder // Fin appel triggers } - // Set new ref and current status - if (! $error) - { - $this->ref = $num; - $this->statut = 1; - } - if (! $error) { $this->db->commit(); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 56c2bccc830..1cf4649547c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -252,14 +252,17 @@ else if ($action == 'setinvoicedate' && $user->rights->facture->creer) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; $object->date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); + if (empty($date)) + { + setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate'); + exit; + } $new_date_lim_reglement = $object->calculate_date_lim_reglement(); - if ($new_date_lim_reglement > $old_date_lim_reglement) - $object->date_lim_reglement = $new_date_lim_reglement; - if ($object->date_lim_reglement < $object->date) - $object->date_lim_reglement = $object->date; + if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement; + if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date; $result = $object->update($user); - if ($result < 0) - dol_print_error($db, $object->error); + if ($result < 0) dol_print_error($db, $object->error); } else if ($action == 'setconditions' && $user->rights->facture->creer) { @@ -267,18 +270,14 @@ else if ($action == 'setconditions' && $user->rights->facture->creer) { $object->cond_reglement_code = 0; // To clean property $object->cond_reglement_id = 0; // To clean property $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - if ($result < 0) - dol_print_error($db, $object->error); + if ($result < 0) dol_print_error($db, $object->error); $old_date_lim_reglement = $object->date_lim_reglement; $new_date_lim_reglement = $object->calculate_date_lim_reglement(); - if ($new_date_lim_reglement > $old_date_lim_reglement) - $object->date_lim_reglement = $new_date_lim_reglement; - if ($object->date_lim_reglement < $object->date) - $object->date_lim_reglement = $object->date; + if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement; + if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date; $result = $object->update($user); - if ($result < 0) - dol_print_error($db, $object->error); + if ($result < 0) dol_print_error($db, $object->error); } else if ($action == 'setpaymentterm' && $user->rights->facture->creer) { @@ -1143,12 +1142,12 @@ else if ($action == 'addline' && $user->rights->facture->creer) // We define price for product if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level)) { - $pu_ht = $prod->multiprices [$object->client->price_level]; - $pu_ttc = $prod->multiprices_ttc [$object->client->price_level]; - $price_min = $prod->multiprices_min [$object->client->price_level]; - $price_base_type = $prod->multiprices_base_type [$object->client->price_level]; - $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; - $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; + $pu_ht = $prod->multiprices[$object->client->price_level]; + $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; + $price_min = $prod->multiprices_min[$object->client->price_level]; + $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + //$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + //$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level]; } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index dfca2831b44..c1fc144e63d 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -466,7 +466,7 @@ if (empty($reshook)) if ($result > 0) { - header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.urlencode($object->ref)); + header('Location: '.DOL_URL_ROOT.'/product/liste.php?type='.$object->type.'&delprod='.urlencode($object->ref)); exit; } else diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 68c12c64bef..1d81029a1e4 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -586,6 +586,10 @@ div.login { height: 16px; } +#securitycode { + min-width: 60px; +} + img.login, img.printer, img.entity { margin:2px 0px 0px 0px; text-decoration:none; diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 04dc5467520..f0c2e96fe52 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -551,6 +551,9 @@ form#login { background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); } +#securitycode { + min-width: 60px; +} #img_securitycode { border: 1px solid #DDDDDD; } diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 8c1758b8648..ee0bcde0baf 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -585,6 +585,9 @@ form#login { background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); } +#securitycode { + min-width: 60px; +} #img_securitycode { border: 1px solid #DDDDDD; } diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 241621d1aff..13dfee590ae 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -657,6 +657,9 @@ form#login { background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); } +#securitycode { + min-width: 60px; +} #img_securitycode { border: 1px solid #DDDDDD; } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index f3c86c0897f..b572ac73f66 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -867,6 +867,9 @@ div#login_left, div#login_right { table.login_table tr td table.none tr td { padding: 2px; } +#securitycode { + min-width: 60px; +} #img_securitycode { border: 1px solid #DDDDDD; }