DELETE FROM `llx_extrafields` WHERE name like 'rental_%';

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`, `alwayseditable`,`list`) VALUES('rental_product', 1, 'product', 'RentalProduct', 'boolean', NULL, 1400150, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_price', 1, 'product', 'RentalDayCost', 'double', '24,8', 1400151, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_costprice', 1, 'product', 'RentalCostprice', 'double', '24,8', 1400152, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_warranty_base', 1, 'product', 'RentalWarrantyBase', 'double', '24,8', 1400153, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES ('rental_label', 1, 'product', 'RentalLabel', 'html', '255', 1400154, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES ('rental_infos', 1, 'product', 'RentalInformations', 'text', '2000', 1400155, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `fieldcomputed`, `fielddefault`, `fieldunique`, `fieldrequired`, `perms`, `enabled`, `pos`, `alwayseditable`, `param`, `list`, `totalizable`, `langs`, `help`) VALUES('rental_accountancy_code', 1, 'product', 'Code comptable location', 'sellist', '', NULL, NULL, 0, 0, NULL, '1', 1400155, 1, 'a:1:{s:7:"options";a:1:{s:57:"accounting_account:account_number|label:rowid::active = 1";N;}}', '1', 0, NULL, NULL);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `fieldcomputed`, `fielddefault`, `fieldunique`, `fieldrequired`, `perms`, `enabled`, `pos`, `alwayseditable`, `param`, `list`, `totalizable`, `langs`, `help`) VALUES('rental_accountancy_code_immo', 1, 'product', 'Code comptable immo (achat)', 'sellist', '', NULL, NULL, 0, 0, NULL, '1', 1400156, 1, 'a:1:{s:7:"options";a:1:{s:57:"accounting_account:account_number|label:rowid::active = 1";N;}}', '1', 0, NULL, NULL);


INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_doc', 1, 'propal', 'RentalQuote', 'boolean', '', 1400151, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_start', 1, 'propal', 'RentalStart', 'datetime', '', 1400155, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_end', 1, 'propal', 'RentalEnd', 'datetime', '', 1400156, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'propal', 'RentalDuration', 'double', '6,1', 1400157, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_line', 1, 'propaldet', 'ToRent', 'boolean', '', 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'propaldet', 'RentalDuration', 'double', '6,1', 1400152, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_day_cost', 1, 'propaldet', 'RentalDayCost', 'double', '24,8', 1400153, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_price', 1, 'propaldet', 'RentalCost', 'double', '24,8', 1400154, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_doc', 1, 'commande', 'RentalOrder', 'boolean', '', 1400151, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_start', 1, 'commande', 'RentalStart', 'datetime', '', 1400155, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_end', 1, 'commande', 'RentalEnd', 'datetime', '', 1400156, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'commande', 'RentalDuration', 'double', '6,1', 1400157, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_line', 1, 'commandedet', 'ToRent', 'boolean', '', 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'commandedet', 'RentalDuration', 'double', '6,1', 1400152, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_day_cost', 1, 'commandedet', 'RentalDayCost', 'double', '24,8', 1400153, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_price', 1, 'commandedet', 'RentalCost', 'double', '24,8', 1400154, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_doc', 1, 'facture', 'RentalInvoice', 'boolean', '', 1400151, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_start', 1, 'facture', 'RentalStart', 'datetime', '', 1400155, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_end', 1, 'facture', 'RentalEnd', 'datetime', '', 1400156, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'facture', 'RentalDuration', 'double', '6,1', 1400157, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_line', 1, 'facturedet', 'ToRent', 'boolean', '', 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'facturedet', 'RentalDuration', 'double', '6,1', 1400152, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_day_cost', 1, 'facturedet', 'RentalDayCost', 'double', '24,8', 1400153, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_price', 1, 'facturedet', 'RentalCost', 'double', '24,8', 1400154, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);


INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_doc', 1, 'facture_rec', 'RentalInvoice', 'boolean', '', 1400151, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_start', 1, 'facture_rec', 'RentalStart', 'datetime', '', 1400155, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_end', 1, 'facture_rec', 'RentalEnd', 'datetime', '', 1400156, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'facture_rec', 'RentalDuration', 'double', '6,1', 1400157, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_line', 1, 'facturedet_rec', 'ToRent', 'boolean', '', 0, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_duration', 1, 'facturedet_rec', 'RentalDuration', 'double', '6,1', 1400152, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_day_cost', 1, 'facturedet_rec', 'RentalDayCost', 'double', '24,8', 1400153, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);
INSERT INTO `llx_extrafields` (`name`, `entity`, `elementtype`, `label`, `type`, `size`, `pos`, `param`, `fieldunique`, `fieldrequired`,`alwayseditable`,`list`) VALUES('rental_price', 1, 'facturedet_rec', 'RentalCost', 'double', '24,8', 1400154, 'a:1:{s:7:"options";a:1:{s:0:"";N;}}', 0, 0, 1, 1);

