This commit is contained in:
Maxime Kohlhaas 2017-09-19 09:13:22 +02:00
commit 5018bf1baf
3 changed files with 22 additions and 19 deletions

View File

@ -100,7 +100,7 @@ elseif ($action == 'update_currency')
if ($submit == $langs->trans('Modify')) if ($submit == $langs->trans('Modify'))
{ {
$fk_multicurrency = GETPOST('fk_multicurrency', 'int'); $fk_multicurrency = GETPOST('fk_multicurrency', 'int');
$rate = GETPOST('rate', 'float'); $rate = price2num(GETPOST('rate', 'alpha'));
$currency = new MultiCurrency($db); $currency = new MultiCurrency($db);
if ($currency->fetch($fk_multicurrency) > 0) if ($currency->fetch($fk_multicurrency) > 0)

View File

@ -2541,7 +2541,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (! empty($conf->expedition->enabled)) { if (! empty($conf->expedition->enabled)) {
$numshipping = $object->nb_expedition(); $numshipping = $object->nb_expedition();
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfProductsLines() > 0) { if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES))) {
if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) { if (($conf->expedition_bon->enabled && $user->rights->expedition->creer) || ($conf->livraison_bon->enabled && $user->rights->expedition->livraison->creer)) {
if ($user->rights->expedition->creer) { if ($user->rights->expedition->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/expedition/shipment.php?id=' . $object->id . '">' . $langs->trans('CreateShipment') . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/expedition/shipment.php?id=' . $object->id . '">' . $langs->trans('CreateShipment') . '</a></div>';

View File

@ -4,6 +4,7 @@
-- when current version is 4.0.0 or higher. -- when current version is 4.0.0 or higher.
-- --
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; -- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
-- -- VPGSQL8.2 ALTER SEQUENCE IF EXISTS llx_table_rowid_seq RENAME TO llx_table_new_rowid_seq;
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; -- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); -- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; -- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
@ -120,6 +121,8 @@ create table llx_expensereport_extrafields
ALTER TABLE llx_expensereport_extrafields ADD INDEX idx_expensereport_extrafields (fk_object); ALTER TABLE llx_expensereport_extrafields ADD INDEX idx_expensereport_extrafields (fk_object);
ALTER TABLE llx_cotisation RENAME TO llx_subscription; ALTER TABLE llx_cotisation RENAME TO llx_subscription;
-- VPGSQL8.2 ALTER SEQUENCE IF EXISTS llx_cotisation_rowid_seq RENAME TO llx_subscription_rowid_seq;
ALTER TABLE llx_subscription ADD UNIQUE INDEX uk_subscription (fk_adherent,dateadh); ALTER TABLE llx_subscription ADD UNIQUE INDEX uk_subscription (fk_adherent,dateadh);
ALTER TABLE llx_subscription CHANGE COLUMN cotisation subscription real; ALTER TABLE llx_subscription CHANGE COLUMN cotisation subscription real;
ALTER TABLE llx_adherent_type CHANGE COLUMN cotisation subscription varchar(3) NOT NULL DEFAULT '1'; ALTER TABLE llx_adherent_type CHANGE COLUMN cotisation subscription varchar(3) NOT NULL DEFAULT '1';