Merge remote-tracking branch 'origin/3.6' into develop

Conflicts:
	htdocs/admin/limits.php
	htdocs/commande/class/commande.class.php
	htdocs/compta/facture.php
	htdocs/core/ajax/ziptown.php
This commit is contained in:
Laurent Destailleur 2014-09-02 13:46:47 +02:00
commit 38233ca05d
10 changed files with 45 additions and 28 deletions

View File

@ -235,9 +235,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: 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: 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 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 #1558 ] Product/service edit page title shows new Ref instead of old ref.
Fix: [ bug #1553 ] Saving User displays setup removes menu. 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 ***** ***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled. Fix: Hide title of event when agenda module disabled.

View File

@ -206,7 +206,7 @@ else
$sql="SELECT taux as vat_rate"; $sql="SELECT taux as vat_rate";
$sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; $sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
$sql.=" WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$mysoc->country_code."' AND taux <> 0"; $sql.=" WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$mysoc->country_code."' AND t.taux <> 0";
$sql.=" ORDER BY t.taux ASC"; $sql.=" ORDER BY t.taux ASC";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info> * Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
@ -9,7 +9,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* *
* This program is free software; you can redistribute it and/or modify * 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 * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *

View File

@ -249,18 +249,23 @@ else if ($action == 'setmode' && $user->rights->facture->creer) {
dol_print_error($db, $object->error); dol_print_error($db, $object->error);
} }
else if ($action == 'setinvoicedate' && $user->rights->facture->creer) { else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
{
$object->fetch($id); $object->fetch($id);
$old_date_lim_reglement = $object->date_lim_reglement; $old_date_lim_reglement = $object->date_lim_reglement;
$object->date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); $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;
}
$object->date=$date;
$new_date_lim_reglement = $object->calculate_date_lim_reglement(); $new_date_lim_reglement = $object->calculate_date_lim_reglement();
if ($new_date_lim_reglement > $old_date_lim_reglement) if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_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 ($object->date_lim_reglement < $object->date)
$object->date_lim_reglement = $object->date;
$result = $object->update($user); $result = $object->update($user);
if ($result < 0) if ($result < 0) dol_print_error($db, $object->error);
dol_print_error($db, $object->error);
} }
else if ($action == 'setconditions' && $user->rights->facture->creer) { else if ($action == 'setconditions' && $user->rights->facture->creer) {
@ -268,18 +273,14 @@ else if ($action == 'setconditions' && $user->rights->facture->creer) {
$object->cond_reglement_code = 0; // To clean property $object->cond_reglement_code = 0; // To clean property
$object->cond_reglement_id = 0; // To clean property $object->cond_reglement_id = 0; // To clean property
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
if ($result < 0) if ($result < 0) dol_print_error($db, $object->error);
dol_print_error($db, $object->error);
$old_date_lim_reglement = $object->date_lim_reglement; $old_date_lim_reglement = $object->date_lim_reglement;
$new_date_lim_reglement = $object->calculate_date_lim_reglement(); $new_date_lim_reglement = $object->calculate_date_lim_reglement();
if ($new_date_lim_reglement > $old_date_lim_reglement) if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_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 ($object->date_lim_reglement < $object->date)
$object->date_lim_reglement = $object->date;
$result = $object->update($user); $result = $object->update($user);
if ($result < 0) if ($result < 0) dol_print_error($db, $object->error);
dol_print_error($db, $object->error);
} }
else if ($action == 'setpaymentterm' && $user->rights->facture->creer) { else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
@ -940,7 +941,7 @@ else if ($action == 'add' && $user->rights->facture->creer)
{ {
// Don't add lines with qty 0 when coming from a shipment including all order lines // Don't add lines with qty 0 when coming from a shipment including all order lines
if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue; if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue;
$label=(! empty($lines[$i]->label)?$lines[$i]->label:''); $label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
@ -1159,12 +1160,12 @@ else if ($action == 'addline' && $user->rights->facture->creer)
// We define price for product // We define price for product
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->thirdparty->price_level)) if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->thirdparty->price_level))
{ {
$pu_ht = $prod->multiprices [$object->thirdparty->price_level]; $pu_ht = $prod->multiprices[$object->thirdparty->price_level];
$pu_ttc = $prod->multiprices_ttc [$object->thirdparty->price_level]; $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
$price_min = $prod->multiprices_min [$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level];
$price_base_type = $prod->multiprices_base_type [$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
$tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; //$tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level];
$tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; //$tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level];
} }
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
{ {

View File

@ -466,7 +466,7 @@ if (empty($reshook))
if ($result > 0) 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; exit;
} }
else else

View File

@ -586,6 +586,10 @@ div.login {
height: 16px; height: 16px;
} }
#securitycode {
min-width: 60px;
}
img.login, img.printer, img.entity { img.login, img.printer, img.entity {
margin:2px 0px 0px 0px; margin:2px 0px 0px 0px;
text-decoration:none; text-decoration:none;

View File

@ -552,6 +552,9 @@ form#login {
background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); 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%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%);
} }
#securitycode {
min-width: 60px;
}
#img_securitycode { #img_securitycode {
border: 1px solid #DDDDDD; border: 1px solid #DDDDDD;
} }

View File

@ -578,6 +578,9 @@ form#login {
background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); 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%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%);
} }
#securitycode {
min-width: 60px;
}
#img_securitycode { #img_securitycode {
border: 1px solid #DDDDDD; border: 1px solid #DDDDDD;
} }

View File

@ -651,6 +651,9 @@ form#login {
background-image: -ms-linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%); 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%); background-image: linear-gradient(top, rgba(240,240,240,.3) 0%, rgba(192,192,192,.3) 100%);
} }
#securitycode {
min-width: 60px;
}
#img_securitycode { #img_securitycode {
border: 1px solid #DDDDDD; border: 1px solid #DDDDDD;
} }

View File

@ -861,6 +861,9 @@ div#login_left, div#login_right {
table.login_table tr td table.none tr td { table.login_table tr td table.none tr td {
padding: 2px; padding: 2px;
} }
#securitycode {
min-width: 60px;
}
#img_securitycode { #img_securitycode {
border: 1px solid #DDDDDD; border: 1px solid #DDDDDD;
} }