';
// Ref supplier
- $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
- $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
+ $morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', 0, 1);
+ $morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
// Project
@@ -2005,7 +2005,7 @@ else
{
$langs->load("projects");
$morehtmlref.='
'.$langs->trans('Project') . ' ';
- if ($user->rights->fournisseur->commande->creer)
+ if ($user->rights->fournisseur->facture->creer)
{
if ($action != 'classify')
$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql
index 7f9c5f97ea4..df533f39db0 100644
--- a/htdocs/install/mysql/data/llx_c_tva.sql
+++ b/htdocs/install/mysql/data/llx_c_tva.sql
@@ -133,13 +133,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 3
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 34, 3, '0','0','VAT Rate 0',1);
-- INDIA (id country=117)
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '12.5','0','VAT standard rate',0);
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1172, 117, '4','0','VAT reduced rate',0);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1171, 117, '12.5','0','VAT standard rate', 0);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1172, 117, '4','0','VAT reduced rate', 0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1173, 117, '1','0','VAT super-reduced rate',0);
-insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1174, 117, '0','0','VAT Rate 0',0);
+insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1174, 117, '0','0','VAT Rate 0', 0);
-insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1176, 117, 'IGST+CGST', 8, 8, '1', 0, '0', 0, 'IGST+CGST', 1);
-insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1177, 117, 'SGST', 0, 0, '0', 16, '1', 0, 'SGST', 1);
+insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1176, 117, 'IGST+CGST', 8, 8, '1', 0, '0', 0, 'IGST+CGST', 1);
+insert into llx_c_tva(rowid,fk_pays,code,taux,localtax1,localtax1_type,localtax2,localtax2_type,recuperableonly,note,active) values (1177, 117, 'SGST' , 0, 0, '0', 16, '1', 0, 'SGST', 1);
-- IRELAND (id country=8)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (81, 8, '0','0','VAT Rate 0',1);
diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index 09c26293bd7..e275d982da4 100755
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -27,12 +27,14 @@
--- VMYSQLUTF8UNICODE ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
--- VMYSQLUTF8UNICODE ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
--- VMYSQLUTF8UNICODE ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
--- VMYSQLUTF8UNICODE ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
--- VMYSQLUTF8UNICODE ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
--- VMYSQLUTF8UNICODE ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
+-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php
index a294dfb94db..a6cd75cccf8 100644
--- a/htdocs/resource/add.php
+++ b/htdocs/resource/add.php
@@ -66,64 +66,72 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
-if ($action == 'confirm_add_resource')
+$hookmanager->initHooks(array('resource_card_add','globalcard'));
+$parameters=array();
+$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+if (empty($reshook))
{
- if (! $cancel)
- {
- $error='';
- $ref=GETPOST('ref','alpha');
- $description=GETPOST('description','alpha');
- $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha');
-
- if (empty($ref))
- {
- $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref"));
- setEventMessages($mesg, null, 'errors');
- $error++;
- }
-
- if (! $error)
- {
- $object=new Dolresource($db);
- $object->ref=$ref;
- $object->description=$description;
- $object->fk_code_type_resource=$fk_code_type_resource;
-
- // Fill array 'array_options' with data from add form
- $ret = $extrafields->setOptionalsFromPost($extralabels, $object);
- if ($ret < 0) {
- $error ++;
- }
-
- $result=$object->create($user);
- if ($result > 0)
- {
- // Creation OK
- $db->commit();
- setEventMessages($langs->trans('ResourceCreatedWithSuccess'), null, 'mesgs');
- Header("Location: card.php?id=" . $object->id);
- return;
- }
- else
- {
- // Creation KO
- setEventMessages($object->error, $object->errors, 'errors');
- $action = '';
- }
- }
- else
- {
- $action = '';
- }
- }
- else
- {
- Header("Location: list.php");
- }
+ if ($action == 'confirm_add_resource')
+ {
+ if (! $cancel)
+ {
+ $error='';
+
+ $ref=GETPOST('ref','alpha');
+ $description=GETPOST('description','alpha');
+ $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha');
+
+ if (empty($ref))
+ {
+ $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref"));
+ setEventMessages($mesg, null, 'errors');
+ $error++;
+ }
+
+ if (! $error)
+ {
+ $object=new Dolresource($db);
+ $object->ref=$ref;
+ $object->description=$description;
+ $object->fk_code_type_resource=$fk_code_type_resource;
+
+ // Fill array 'array_options' with data from add form
+ $ret = $extrafields->setOptionalsFromPost($extralabels, $object);
+ if ($ret < 0) {
+ $error ++;
+ }
+
+ $result=$object->create($user);
+ if ($result > 0)
+ {
+ // Creation OK
+ $db->commit();
+ setEventMessages($langs->trans('ResourceCreatedWithSuccess'), null, 'mesgs');
+ Header("Location: card.php?id=" . $object->id);
+ return;
+ }
+ else
+ {
+ // Creation KO
+ setEventMessages($object->error, $object->errors, 'errors');
+ $action = '';
+ }
+ }
+ else
+ {
+ $action = '';
+ }
+ }
+ else
+ {
+ Header("Location: list.php");
+ }
+ }
}
-
/*
* View
*/
diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php
index 02d38c2b924..db6eed63b3b 100644
--- a/htdocs/resource/card.php
+++ b/htdocs/resource/card.php
@@ -54,10 +54,13 @@ if ($user->societe_id > 0)
accessforbidden();
}
-if( ! $user->rights->resource->read)
+if (! $user->rights->resource->read)
accessforbidden();
$object = new Dolresource($db);
+$objectFetchRes = $object->fetch($id);
+if (! ($objectFetchRes > 0)) dol_print_error($db, $object->error);
+
$extrafields = new ExtraFields($db);
@@ -162,7 +165,7 @@ llxHeader('',$pagetitle,'');
$form = new Form($db);
$formresource = new FormResource($db);
-if ( $object->fetch($id) > 0 )
+if ( $objectFetchRes > 0 )
{
$head=resource_prepare_head($object);
diff --git a/htdocs/support/index.php b/htdocs/support/index.php
index 0e27107ef54..dc1872a1b45 100644
--- a/htdocs/support/index.php
+++ b/htdocs/support/index.php
@@ -70,12 +70,12 @@ print '
';
print '';
print '';
-print '| '.img_picto('','who.png','',1).' | ';
+print '| '.img_picto('','who.png','class="valigntextbottom"',1).' | ';
print ''.$langs->trans("CommunitySupport").'';
print ' '.$langs->trans("TypeOfSupport").': '.$langs->trans("TypeSupportCommunauty").'';
print ' '.$langs->trans("TypeOfHelp").'/'.$langs->trans("Efficiency").'/'.$langs->trans("Price").': ';
-print $langs->trans("TypeHelpDev").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1).img_picto_common('','star','',1);
+print $langs->trans("TypeHelpDev").'/'.img_picto_common('','redstar','class="valigntextbottom"',1).img_picto_common('','redstar','class="valigntextbottom"',1).'/'.img_picto_common('','star','class="valigntextbottom"',1).img_picto_common('','star','class="valigntextbottom"',1).img_picto_common('','star','class="valigntextbottom"',1).img_picto_common('','star','class="valigntextbottom"',1);
print ' | ';
print ' | ';
@@ -107,88 +107,17 @@ print "\n";
print '';
-/*
-
-// Official support
-print ' ';
-print '';
-print '';
-
-print '| '.img_picto('','internet.png','',1).' | ';
-print ''.$langs->trans("OfficialSupport").'';
-print ' '.$langs->trans("TypeOfSupport").': '.$langs->trans("TypeSupportCommercial").'';
-print ' '.$langs->trans("TypeOfHelp").'/'.$langs->trans("Efficiency").'/'.$langs->trans("Price").': ';
-print $langs->trans("TypeHelpOnly").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1);
-
-print ' | ';
-
-print ' | ';
-print ' ';
-print '';
-print '';
-print '';
-
-//TODO Create commercial dedicated page into dolibarr.org?
-$urlofficialsupport='http://wiki.dolibarr.org/index.php/Dolibarr_help_and_support';
-
-//TODO Create commercial dedicated page into dolibarr.fr?
-if (preg_match('/fr/i',$langs->defaultlang)) $urlofficialsupport='http://wiki.dolibarr.org/index.php/Assistance_Dolibarr';
-
-if (preg_match('/es/i',$langs->defaultlang)) $urlofficialsupport='http://www.dolibarr.es/soporte/';
-print ' '.$langs->trans("SeeOfficalSupport",$urlofficialsupport,$langs->transnoentities("ClickHere")).' ';
-print ' | ';
-print ' | ';
-print ' ';
-print ' '."\n";
-print "\n";
-
-print ' ';
-
-
-// Online support
-print ' ';
-print '';
-print '';
-
-print '| '.img_picto('','internet.png','',1).' | ';
-
-print ''.$langs->trans("RemoteControlSupport").'';
-print ' '.$langs->trans("TypeOfSupport").': '.$langs->trans("TypeSupportCommercial").'';
-print ' '.$langs->trans("TypeOfHelp").'/'.$langs->trans("Efficiency").'/'.$langs->trans("Price").': ';
-print $langs->trans("TypeHelpOnly").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1);
-
-print ' | ';
-
-print ' | ';
-print ' ';
-print '| ';
-print '';
-print ' | ';
-print ' ';
-print ' '."\n";
-
-
-
-print ' ';
-*/
-
// EMail support
print ' ';
print '';
print '';
-print '| '.img_picto('','mail.png','',1).' | ';
+print '| '.img_picto('','mail.png','class="valigntextbottom"',1).' | ';
print ''.$langs->trans("EMailSupport").'';
print ' '.$langs->trans("TypeOfSupport").': '.$langs->trans("TypeSupportCommercial").'';
print ' '.$langs->trans("TypeOfHelp").'/'.$langs->trans("Efficiency").'/'.$langs->trans("Price").': ';
-print $langs->trans("TypeHelpOnly").'/'.img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).img_picto_common('','redstar','',1).'/'.img_picto_common('','star','',1).img_picto_common('','star','',1);
+print $langs->trans("TypeHelpOnly").'/'.img_picto_common('','redstar','class="valigntextbottom"',1).img_picto_common('','redstar','class="valigntextbottom"',1).img_picto_common('','redstar','class="valigntextbottom"',1).'/'.img_picto_common('','star','class="valigntextbottom"',1).img_picto_common('','star','class="valigntextbottom"',1);
print ' | ';
@@ -216,7 +145,7 @@ print '';
print '';
print '';
-print '| '.img_picto('','pagemaster.png','',1).' | ';
+print '| '.img_picto('','pagemaster.png','class="valigntextbottom"',1).' | ';
print ''.$langs->trans("OtherSupport").'';
print ' '.$langs->trans("TypeOfSupport").': '.$langs->trans("TypeSupportCommercial").'';
|
|
| |
|
|