diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 46a48b31bf868925145a08d3a513ebb6184a78bf..18ae5e764e38e210ae12e11f18d95eb6985ecde9 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1508,9 +1508,11 @@ class Categorie extends CommonObject /** * Update ou cree les traductions des infos produits * + * @param User $user Object user + * * @return int <0 if KO, >0 if OK */ - function setMultiLangs() + function setMultiLangs($user) { global $langs; @@ -1574,6 +1576,15 @@ class Categorie extends CommonObject } } } + + // Call trigger + $result = $this->call_trigger('CATEGORY_SET_MULTILANGS',$user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + // End call triggers + return 1; } diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 98f02c7a7428ab7fd19d95b6d84bf4e25ca03a18..02033b27bff51657d0a11388f53ab414b78feb03 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -88,7 +88,7 @@ $cancel != $langs->trans("Cancel") && } // sauvegarde en base - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } @@ -121,7 +121,7 @@ $cancel != $langs->trans("Cancel") && } } - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index da24e1360dedc2740db2f440db6bb42a4dc37d25..fbaba482c502c53736ed1f72755c190f59486db5 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -255,6 +255,7 @@ if (empty($reshook)) $object->demand_reason_id = GETPOST('demand_reason_id'); $object->date_livraison = $datelivraison; $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); + $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->fk_delivery_address = GETPOST('fk_address'); $object->contactid = GETPOST('contactid'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); @@ -549,6 +550,14 @@ if (empty($reshook)) } } + // warehouse + else if ($action == 'setwarehouse' && $user->rights->commande->creer) { + $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + else if ($action == 'setremisepercent' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise_percent')); } @@ -1311,6 +1320,7 @@ if ($action == 'create' && $user->rights->commande->creer) $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); $availability_id = (!empty($objectsrc->availability_id)?$objectsrc->availability_id:(!empty($soc->availability_id)?$soc->availability_id:0)); $shipping_method_id = (! empty($objectsrc->shipping_method_id)?$objectsrc->shipping_method_id:(! empty($soc->shipping_method_id)?$soc->shipping_method_id:0)); + $warehouse_id = (! empty($objectsrc->warehouse_id)?$objectsrc->warehouse_id:(! empty($soc->warehouse_id)?$soc->warehouse_id:0)); $demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); @@ -1332,6 +1342,7 @@ if ($action == 'create' && $user->rights->commande->creer) $fk_account = $soc->fk_account; $availability_id = $soc->availability_id; $shipping_method_id = $soc->shipping_method_id; + $warehouse_id = $soc->warehouse_id; $demand_reason_id = $soc->demand_reason_id; $remise_percent = $soc->remise_percent; $remise_absolue = 0; @@ -1464,6 +1475,15 @@ if ($action == 'create' && $user->rights->commande->creer) print '</td></tr>'; } + // Warehouse + if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + print '<tr><td>' . $langs->trans('Warehouse') . '</td><td colspan="2">'; + print $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1); + print '</td></tr>'; + } + // What trigger creation print '<tr><td>' . $langs->trans('Source') . '</td><td colspan="2">'; $form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1); @@ -1976,6 +1996,27 @@ if ($action == 'create' && $user->rights->commande->creer) print '</tr>'; } + // Warehouse + if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + print '<tr><td>'; + print '<table width="100%" class="nobordernopadding"><tr><td>'; + print $langs->trans('Warehouse'); + print '</td>'; + if ($action != 'editwarehouse' && $user->rights->commande->creer) + print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editwarehouse&id='.$object->id.'">'.img_edit($langs->trans('SetWarehouse'),1).'</a></td>'; + print '</tr></table>'; + print '</td><td colspan="3">'; + if ($action == 'editwarehouse') { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); + } else { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); + } + print '</td>'; + print '</tr>'; + } + // Terms of payment print '<tr><td height="10">'; print '<table class="nobordernopadding" width="100%"><tr><td>'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 0a453db92dba549ee52642f1f015265e01b860fd..63efabe486179778c681b8e334b38bc31c5dff14 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -140,7 +140,7 @@ if (empty($reshook)) header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -156,7 +156,7 @@ if (empty($reshook)) header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -180,7 +180,7 @@ if (empty($reshook)) header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php'); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action=''; } } @@ -213,7 +213,7 @@ if (empty($reshook)) exit(); } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -235,13 +235,13 @@ if (empty($reshook)) if ($object->type == Facture::TYPE_CREDIT_NOTE) { // Si avoir, le signe doit etre negatif if ($object->total_ht >= 0) { - setEventMessage($langs->trans("ErrorInvoiceAvoirMustBeNegative"), 'errors'); + setEventMessages($langs->trans("ErrorInvoiceAvoirMustBeNegative"), null, 'errors'); $action = ''; } } else { // Si non avoir, le signe doit etre positif if (empty($conf->global->FACTURE_ENABLE_NEGATIVE) && $object->total_ht < 0) { - setEventMessage($langs->trans("ErrorInvoiceOfThisTypeMustBePositive"), 'errors'); + setEventMessages($langs->trans("ErrorInvoiceOfThisTypeMustBePositive"), null, 'errors'); $action = ''; } } @@ -311,7 +311,7 @@ if (empty($reshook)) $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); if ($object->date_lim_reglement < $object->date) { $object->date_lim_reglement = $object->calculate_date_lim_reglement(); - setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), 'warnings'); + setEventMessages($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), null, 'warnings'); } $result = $object->update($user); if ($result < 0) @@ -354,7 +354,7 @@ if (empty($reshook)) if ($ret > 0) { $result = $object->insert_discount($_POST["remise_id"]); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { dol_print_error($db, $object->error); @@ -367,7 +367,7 @@ if (empty($reshook)) $result = $discount->link_to_invoice(0, $id); if ($result < 0) { - setEventMessage($discount->error, 'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); } } } @@ -449,7 +449,7 @@ if (empty($reshook)) else { if (count($object->errors)) setEventMessage($object->errors, 'errors'); - else setEventMessage($object->error, 'errors'); + else setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -477,7 +477,7 @@ if (empty($reshook)) { if (! $idwarehouse || $idwarehouse == - 1) { $error ++; - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; } } @@ -511,7 +511,7 @@ if (empty($reshook)) if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) { $result=$object->set_draft($user, $idwarehouse); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); // Define output language @@ -539,7 +539,7 @@ if (empty($reshook)) { $object->fetch($id); $result = $object->set_paid($user); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } // Classif "paid partialy" else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement) { @@ -548,7 +548,7 @@ if (empty($reshook)) $close_note = $_POST["close_note"]; if ($close_code) { $result = $object->set_paid($user, $close_code, $close_note); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } @@ -559,7 +559,7 @@ if (empty($reshook)) $close_note = $_POST["close_note"]; if ($close_code) { $result = $object->set_canceled($user, $close_code, $close_note); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } @@ -603,7 +603,7 @@ if (empty($reshook)) elseif ($object->type == Facture::TYPE_DEPOSIT) $discount->description = '(DEPOSIT)'; else { - setEventMessage($langs->trans('CantConvertToReducAnInvoiceOfThisType'),'errors'); + setEventMessages($langs->trans('CantConvertToReducAnInvoiceOfThisType'), null, 'errors'); } $discount->tva_tx = abs($object->total_ttc); $discount->fk_soc = $object->socid; @@ -636,13 +636,13 @@ if (empty($reshook)) } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } else { - setEventMessage($discount->error,'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } } @@ -705,7 +705,7 @@ if (empty($reshook)) $id = $object->createFromCurrent($user); if ($id <= 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -979,7 +979,7 @@ if (empty($reshook)) $amountdeposit = ($totalamount * $valuedeposit) / 100; } } else { - setEventMessage($srcobject->error, 'errors'); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error ++; } } @@ -1119,12 +1119,12 @@ if (empty($reshook)) if ($reshook < 0) $error ++; } else { - setEventMessage($srcobject->error, 'errors'); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error ++; } } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error ++; } } // If some invoice's lines already known @@ -1237,11 +1237,11 @@ if (empty($reshook)) } if (empty($idprod) && ($price_ht < 0) && ($qty < 0)) { - setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not '' @@ -1250,16 +1250,16 @@ if (empty($reshook)) $error ++; } if ($qty == '') { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error ++; } if ($qty < 0) { $langs->load("errors"); - setEventMessage($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), 'errors'); + setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors'); $error ++; } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { @@ -1413,7 +1413,7 @@ if (empty($reshook)) if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $date_start, $date_end, 0, $info_bits, '', $price_base_type, $pu_ttc, $type, - 1, $special_code, '', 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $_POST['progress'], '', $fk_unit); @@ -1473,7 +1473,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; @@ -1555,7 +1555,7 @@ if (empty($reshook)) // Check price is not lower than minimum (check is done only for standard or replacement invoices) if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), 'errors'); + setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error ++; } } else { @@ -1570,7 +1570,7 @@ if (empty($reshook)) } if ($qty < 0) { $langs->load("errors"); - setEventMessage($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), 'errors'); + setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors'); $error ++; } @@ -1634,7 +1634,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -1728,8 +1728,8 @@ if (empty($reshook)) $upload_dir = $conf->facture->dir_output; $file = $upload_dir . '/' . GETPOST('file'); $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action = ''; } } elseif ($action == 'update_extras') { @@ -1775,9 +1775,9 @@ if (empty($reshook)) } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } // bascule du statut d'un contact @@ -2387,7 +2387,7 @@ if ($action == 'create') $cntinvoice=count($objectsrc->linkedObjects['facture']); if ($cntinvoice>=1) { - setEventMessage('WarningBillExist','warnings'); + setEventMessages('WarningBillExist', null, 'warnings'); echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')'; } echo '</td></tr>'; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 8c028b23aaa9adced6249c02a7a017b33825292c..393070d410b061cb893d45505dfb60142ee02007 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -118,7 +118,7 @@ if (empty($reshook)) { $langs->load("errors"); //$error++; - setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); + setEventMessages($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), null, 'warnings'); } } @@ -129,7 +129,7 @@ if (empty($reshook)) // Check parameters if (! GETPOST('paiementcode')) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors'); $error++; } @@ -138,20 +138,20 @@ if (empty($reshook)) // If bank module is on, account is required to enter a payment if (GETPOST('accountid') <= 0) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } } if (empty($totalpayment) && empty($atleastonepaymentnotnull)) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->trans('PaymentAmount')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->trans('PaymentAmount')), null, 'errors'); $error++; } if (empty($datepaye)) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors'); $error++; } } @@ -194,7 +194,7 @@ if (empty($reshook)) // Si module bank actif, un compte est obligatoire lors de la saisie d'un paiement if (GETPOST('accountid') <= 0) { - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } } @@ -212,7 +212,7 @@ if (empty($reshook)) $paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices')=='on'?1:0)); if ($paiement_id < 0) { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } @@ -224,7 +224,7 @@ if (empty($reshook)) $result=$paiement->addPaymentToBank($user,'payment',$label,GETPOST('accountid'),GETPOST('chqemetteur'),GETPOST('chqbank')); if ($result < 0) { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index dc2fad6d35d20f377d18ef6028554205a83816e3..ad59687b43c23294445dd1e2cd52499422fee282 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -70,7 +70,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char } else { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $db->rollback(); } } @@ -108,7 +108,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->char } else { - setEventMessage($paiement->error); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $db->rollback(); } } @@ -140,7 +140,7 @@ $h++; dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, 'payment'); /* - * Confirmation de la suppression du paiement + * Deletion confirmation of payment */ if ($action == 'delete') { @@ -149,7 +149,7 @@ if ($action == 'delete') } /* - * Confirmation de la validation du paiement + * Validation confirmation of payment */ if ($action == 'valide') { diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index fa01e9c5e9e8e4b03ff8eefe92e7f0b5c4b14e75..d43ba27ef2665da439ba2ff81c80f1f4d1c71e33 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -68,7 +68,7 @@ if ($action == 'confirm_rejet') { $error++; $langs->load("error"); - setEventMessage($langs->transnoentities("ErrorDateMustBeBeforeToday"),'errors'); + setEventMessages($langs->transnoentities("ErrorDateMustBeBeforeToday"), null, 'errors'); } if (GETPOST('motif','alpha') == 0) @@ -261,7 +261,7 @@ if ($id) if ($sortfield == "") $sortfield="pl.fk_soc"; /* - * Liste des factures + * List of invoices */ $sql = "SELECT pf.rowid"; $sql.= " ,f.rowid as facid, f.facnumber as ref, f.total_ttc, f.paye, f.fk_statut"; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 969b840aeb989546a55f5652dc41504b2e867df1..4b5b0edd784e1949fcde2a84a0437b75b666ec60 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -166,18 +166,18 @@ if ($action == 'delete') { $object->error=$accountline->error; $db->rollback(); - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { $db->rollback(); - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage('Error try do delete a line linked to a conciliated bank transaction','errors'); + setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 780598fc0732a2aea32a9616ed1fd08e32372a9e..2a9894be87a72813bbbb37fc90ed630868d59fe7 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -103,7 +103,7 @@ if ($action == 'add' && $user->rights->tax->charges->creer) } elseif (! is_numeric($amount)) { - setEventMessage($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; } else @@ -148,7 +148,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->cr } elseif (! is_numeric($amount)) { - setEventMessage($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; } else @@ -164,7 +164,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->cr $result=$chargesociales->update($user); if ($result <= 0) { - setEventMessage($chargesociales->error, 'errors'); + setEventMessages($chargesociales->error, $chargesociales->errors, 'errors'); } } } diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 5c362fda9942dd5ab7a91eb11902904b0d393ecf..ed80ee21a4ed0730a2ed462fe7648518f01ad8ba 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -114,7 +114,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) else { $db->rollback(); - setEventMessage($tva->error, 'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); $action="create"; } } @@ -150,18 +150,18 @@ if ($action == 'delete') { $tva->error=$accountline->error; $db->rollback(); - setEventMessage($tva->error,'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else { $db->rollback(); - setEventMessage($tva->error,'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else { - setEventMessage('Error try do delete a line linked to a conciliated bank transaction','errors'); + setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 6ac6433bb621f874aaf2549829f971ee538c1bd7..32d09238fd522bd66e8d53ba0054c0c87ffe0d88 100644 --- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -100,6 +100,7 @@ class InterfaceDemo extends DolibarrTriggers case 'PRODUCT_MODIFY': case 'PRODUCT_DELETE': case 'PRODUCT_PRICE_MODIFY': + case 'PRODUCT_SET_MULTILANGS': //Stock mouvement case 'STOCK_MOVEMENT': @@ -234,6 +235,7 @@ class InterfaceDemo extends DolibarrTriggers case 'CATEGORY_CREATE': case 'CATEGORY_MODIFY': case 'CATEGORY_DELETE': + case 'CATEGORY_SET_MULTILANGS': // Projects case 'PROJECT_CREATE': diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 6ef8096d8b42caaa8f3de51afee9403ab9d5a3a9..c201cdbbec44ddae0ac11c2899e194069fdd4e17 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -8,6 +8,7 @@ -- Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es> -- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de> -- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> +-- Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> -- -- 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 @@ -271,3 +272,13 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) v INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1215, '', 0, 'Laâyoune-Boujdour-Sakia el Hamra', 1); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1216, '', 0, 'Oued Ed-Dahab Lagouira', 1); +-- Regions Bolivia (id country=52) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 76544173bbf4ef4d4784c6c8170f5409cd4c0c94..e8d8c9f6ae1e290dd1fe79f140d29d74239f7bd1 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -8,6 +8,7 @@ -- Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> -- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de> -- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> +-- Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es> -- -- 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 @@ -1100,3 +1101,116 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1); +-- Provinces Bolivia (id country=52) +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('003', 5201, '', 0, '', 'Jaime Zudáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('004', 5201, '', 0, '', 'Juana Azurduy de Padilla', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('005', 5201, '', 0, '', 'Luis Calvo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('006', 5201, '', 0, '', 'Nor Cinti', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('007', 5201, '', 0, '', 'Oropeza', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('008', 5201, '', 0, '', 'Sud Cinti', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('009', 5201, '', 0, '', 'Tomina', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('010', 5201, '', 0, '', 'Yamparáez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 5202, '', 0, '', 'Abel Iturralde', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('012', 5202, '', 0, '', 'Aroma', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('013', 5202, '', 0, '', 'Bautista Saavedra', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 5202, '', 0, '', 'Caranavi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('015', 5202, '', 0, '', 'Eliodoro Camacho', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('016', 5202, '', 0, '', 'Franz Tamayo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('017', 5202, '', 0, '', 'Gualberto Villarroel', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('018', 5202, '', 0, '', 'Ingaví', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('019', 5202, '', 0, '', 'Inquisivi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('020', 5202, '', 0, '', 'José Ramón Loayza', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 5202, '', 0, '', 'Larecaja', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 5202, '', 0, '', 'Los Andes (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 5202, '', 0, '', 'Manco Kapac', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('024', 5202, '', 0, '', 'Muñecas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('025', 5202, '', 0, '', 'Nor Yungas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('026', 5202, '', 0, '', 'Omasuyos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('027', 5202, '', 0, '', 'Pacajes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('028', 5202, '', 0, '', 'Pedro Domingo Murillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('029', 5202, '', 0, '', 'Sud Yungas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('030', 5202, '', 0, '', 'General José Manuel Pando', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 5203, '', 0, '', 'Arani', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 5203, '', 0, '', 'Arque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 5203, '', 0, '', 'Ayopaya', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('034', 5203, '', 0, '', 'Bolívar (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('035', 5203, '', 0, '', 'Campero', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('036', 5203, '', 0, '', 'Capinota', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('037', 5203, '', 0, '', 'Cercado (Cochabamba)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('038', 5203, '', 0, '', 'Esteban Arze', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('039', 5203, '', 0, '', 'Germán Jordán', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('040', 5203, '', 0, '', 'José Carrasco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 5203, '', 0, '', 'Mizque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 5203, '', 0, '', 'Punata', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 5203, '', 0, '', 'Quillacollo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('044', 5203, '', 0, '', 'Tapacarí', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('045', 5203, '', 0, '', 'Tiraque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('046', 5203, '', 0, '', 'Chapare', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('047', 5204, '', 0, '', 'Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('048', 5204, '', 0, '', 'Cercado (Oruro)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('049', 5204, '', 0, '', 'Eduardo Avaroa', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('050', 5204, '', 0, '', 'Ladislao Cabrera', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 5204, '', 0, '', 'Litoral de Atacama', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 5204, '', 0, '', 'Mejillones', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 5204, '', 0, '', 'Nor Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 5204, '', 0, '', 'Pantaleón Dalence', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 5204, '', 0, '', 'Poopó', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 5204, '', 0, '', 'Sabaya', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 5204, '', 0, '', 'Sajama', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 5204, '', 0, '', 'San Pedro de Totora', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('059', 5204, '', 0, '', 'Saucarí', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('060', 5204, '', 0, '', 'Sebastián Pagador', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 5204, '', 0, '', 'Sud Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 5204, '', 0, '', 'Tomás Barrón', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 5205, '', 0, '', 'Alonso de Ibáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('064', 5205, '', 0, '', 'Antonio Quijarro', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('065', 5205, '', 0, '', 'Bernardino Bilbao', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('066', 5205, '', 0, '', 'Charcas (Potosí)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('067', 5205, '', 0, '', 'Chayanta', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('068', 5205, '', 0, '', 'Cornelio Saavedra', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('069', 5205, '', 0, '', 'Daniel Campos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('070', 5205, '', 0, '', 'Enrique Baldivieso', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 5205, '', 0, '', 'José María Linares', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 5205, '', 0, '', 'Modesto Omiste', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 5205, '', 0, '', 'Nor Chichas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 5205, '', 0, '', 'Nor Lípez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('075', 5205, '', 0, '', 'Rafael Bustillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('076', 5205, '', 0, '', 'Sud Chichas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('077', 5205, '', 0, '', 'Sud Lípez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('078', 5205, '', 0, '', 'Tomás Frías', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('079', 5206, '', 0, '', 'Aniceto Arce', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('080', 5206, '', 0, '', 'Burdet O''Connor', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 5206, '', 0, '', 'Cercado (Tarija)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 5206, '', 0, '', 'Eustaquio Méndez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 5206, '', 0, '', 'José María Avilés', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 5206, '', 0, '', 'Gran Chaco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('085', 5207, '', 0, '', 'Andrés Ibáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('086', 5207, '', 0, '', 'Caballero', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('087', 5207, '', 0, '', 'Chiquitos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('088', 5207, '', 0, '', 'Cordillera (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('089', 5207, '', 0, '', 'Florida', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('090', 5207, '', 0, '', 'Germán Busch', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 5207, '', 0, '', 'Guarayos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 5207, '', 0, '', 'Ichilo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('093', 5207, '', 0, '', 'Obispo Santistevan', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('094', 5207, '', 0, '', 'Sara', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('095', 5207, '', 0, '', 'Vallegrande', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('096', 5207, '', 0, '', 'Velasco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('097', 5207, '', 0, '', 'Warnes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('098', 5207, '', 0, '', 'Ángel Sandóval', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('099', 5207, '', 0, '', 'Ñuflo de Chaves', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('100', 5208, '', 0, '', 'Cercado (Beni)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 5208, '', 0, '', 'Iténez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 5208, '', 0, '', 'Mamoré', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 5208, '', 0, '', 'Marbán', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 5208, '', 0, '', 'Moxos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('105', 5208, '', 0, '', 'Vaca Díez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('106', 5208, '', 0, '', 'Yacuma', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('107', 5208, '', 0, '', 'General José Ballivián Segurola', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('108', 5209, '', 0, '', 'Abuná', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('109', 5209, '', 0, '', 'Madre de Dios', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('110', 5209, '', 0, '', 'Manuripi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index 2cf877acbbc11d17f3aa02f12e9bc08273d0cf9f..5adc839a7d64d0717b6b023c56c51267e4f64ce4 100755 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -315,4 +315,127 @@ ALTER TABLE llx_c_tva ADD COLUMN code varchar(10) DEFAULT '' after fk_pays; DROP INDEX uk_c_tva_id ON llx_c_tva; ALTER TABLE llx_c_tva ADD UNIQUE INDEX uk_c_tva_id (fk_pays, code, taux, recuperableonly); - +-- Regions Bolivia (id country=52) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5201, '', 0, 'Chuquisaca', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5202, '', 0, 'La Paz', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5203, '', 0, 'Cochabamba', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5204, '', 0, 'Oruro', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5205, '', 0, 'Potosí', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1); + +-- Provinces Bolivia (id country=52) +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('001', 5201, '', 0, '', 'Belisario Boeto', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('002', 5201, '', 0, '', 'Hernando Siles', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('003', 5201, '', 0, '', 'Jaime Zudáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('004', 5201, '', 0, '', 'Juana Azurduy de Padilla', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('005', 5201, '', 0, '', 'Luis Calvo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('006', 5201, '', 0, '', 'Nor Cinti', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('007', 5201, '', 0, '', 'Oropeza', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('008', 5201, '', 0, '', 'Sud Cinti', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('009', 5201, '', 0, '', 'Tomina', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('010', 5201, '', 0, '', 'Yamparáez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('011', 5202, '', 0, '', 'Abel Iturralde', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('012', 5202, '', 0, '', 'Aroma', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('013', 5202, '', 0, '', 'Bautista Saavedra', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('014', 5202, '', 0, '', 'Caranavi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('015', 5202, '', 0, '', 'Eliodoro Camacho', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('016', 5202, '', 0, '', 'Franz Tamayo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('017', 5202, '', 0, '', 'Gualberto Villarroel', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('018', 5202, '', 0, '', 'Ingaví', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('019', 5202, '', 0, '', 'Inquisivi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('020', 5202, '', 0, '', 'José Ramón Loayza', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('021', 5202, '', 0, '', 'Larecaja', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('022', 5202, '', 0, '', 'Los Andes (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('023', 5202, '', 0, '', 'Manco Kapac', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('024', 5202, '', 0, '', 'Muñecas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('025', 5202, '', 0, '', 'Nor Yungas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('026', 5202, '', 0, '', 'Omasuyos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('027', 5202, '', 0, '', 'Pacajes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('028', 5202, '', 0, '', 'Pedro Domingo Murillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('029', 5202, '', 0, '', 'Sud Yungas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('030', 5202, '', 0, '', 'General José Manuel Pando', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('031', 5203, '', 0, '', 'Arani', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('032', 5203, '', 0, '', 'Arque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('033', 5203, '', 0, '', 'Ayopaya', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('034', 5203, '', 0, '', 'Bolívar (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('035', 5203, '', 0, '', 'Campero', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('036', 5203, '', 0, '', 'Capinota', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('037', 5203, '', 0, '', 'Cercado (Cochabamba)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('038', 5203, '', 0, '', 'Esteban Arze', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('039', 5203, '', 0, '', 'Germán Jordán', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('040', 5203, '', 0, '', 'José Carrasco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('041', 5203, '', 0, '', 'Mizque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('042', 5203, '', 0, '', 'Punata', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('043', 5203, '', 0, '', 'Quillacollo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('044', 5203, '', 0, '', 'Tapacarí', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('045', 5203, '', 0, '', 'Tiraque', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('046', 5203, '', 0, '', 'Chapare', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('047', 5204, '', 0, '', 'Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('048', 5204, '', 0, '', 'Cercado (Oruro)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('049', 5204, '', 0, '', 'Eduardo Avaroa', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('050', 5204, '', 0, '', 'Ladislao Cabrera', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('051', 5204, '', 0, '', 'Litoral de Atacama', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('052', 5204, '', 0, '', 'Mejillones', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('053', 5204, '', 0, '', 'Nor Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('054', 5204, '', 0, '', 'Pantaleón Dalence', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('055', 5204, '', 0, '', 'Poopó', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('056', 5204, '', 0, '', 'Sabaya', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('057', 5204, '', 0, '', 'Sajama', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('058', 5204, '', 0, '', 'San Pedro de Totora', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('059', 5204, '', 0, '', 'Saucarí', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('060', 5204, '', 0, '', 'Sebastián Pagador', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('061', 5204, '', 0, '', 'Sud Carangas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('062', 5204, '', 0, '', 'Tomás Barrón', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('063', 5205, '', 0, '', 'Alonso de Ibáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('064', 5205, '', 0, '', 'Antonio Quijarro', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('065', 5205, '', 0, '', 'Bernardino Bilbao', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('066', 5205, '', 0, '', 'Charcas (Potosí)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('067', 5205, '', 0, '', 'Chayanta', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('068', 5205, '', 0, '', 'Cornelio Saavedra', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('069', 5205, '', 0, '', 'Daniel Campos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('070', 5205, '', 0, '', 'Enrique Baldivieso', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('071', 5205, '', 0, '', 'José María Linares', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('072', 5205, '', 0, '', 'Modesto Omiste', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('073', 5205, '', 0, '', 'Nor Chichas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('074', 5205, '', 0, '', 'Nor Lípez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('075', 5205, '', 0, '', 'Rafael Bustillo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('076', 5205, '', 0, '', 'Sud Chichas', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('077', 5205, '', 0, '', 'Sud Lípez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('078', 5205, '', 0, '', 'Tomás Frías', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('079', 5206, '', 0, '', 'Aniceto Arce', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('080', 5206, '', 0, '', 'Burdet O''Connor', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('081', 5206, '', 0, '', 'Cercado (Tarija)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('082', 5206, '', 0, '', 'Eustaquio Méndez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('083', 5206, '', 0, '', 'José María Avilés', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('084', 5206, '', 0, '', 'Gran Chaco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('085', 5207, '', 0, '', 'Andrés Ibáñez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('086', 5207, '', 0, '', 'Caballero', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('087', 5207, '', 0, '', 'Chiquitos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('088', 5207, '', 0, '', 'Cordillera (Bolivia)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('089', 5207, '', 0, '', 'Florida', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('090', 5207, '', 0, '', 'Germán Busch', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('091', 5207, '', 0, '', 'Guarayos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('092', 5207, '', 0, '', 'Ichilo', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('093', 5207, '', 0, '', 'Obispo Santistevan', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('094', 5207, '', 0, '', 'Sara', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('095', 5207, '', 0, '', 'Vallegrande', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('096', 5207, '', 0, '', 'Velasco', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('097', 5207, '', 0, '', 'Warnes', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('098', 5207, '', 0, '', 'Ángel Sandóval', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('099', 5207, '', 0, '', 'Ñuflo de Chaves', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('100', 5208, '', 0, '', 'Cercado (Beni)', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('101', 5208, '', 0, '', 'Iténez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('102', 5208, '', 0, '', 'Mamoré', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('103', 5208, '', 0, '', 'Marbán', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('104', 5208, '', 0, '', 'Moxos', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('105', 5208, '', 0, '', 'Vaca Díez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('106', 5208, '', 0, '', 'Yacuma', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('107', 5208, '', 0, '', 'General José Ballivián Segurola', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('108', 5209, '', 0, '', 'Abuná', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('109', 5209, '', 0, '', 'Madre de Dios', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('110', 5209, '', 0, '', 'Manuripi', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1); +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1); \ No newline at end of file diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fea8ccb8e628fa908622d0dd19174d4dce8b4121..30c6d82d73f3d0738a2afd16c05c492dca8d22c4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -738,7 +738,7 @@ class Product extends CommonObject // Multilangs if (! empty($conf->global->MAIN_MULTILANGS)) { - if ( $this->setMultiLangs() < 0) + if ( $this->setMultiLangs($user) < 0) { $this->error=$langs->trans("Error")." : ".$this->db->error()." - ".$sql; return -2; @@ -968,9 +968,11 @@ class Product extends CommonObject /** * Update or add a translation for a product * + * @param User $user Object user making update + * * @return int <0 if KO, >0 if OK */ - function setMultiLangs() + function setMultiLangs($user) { global $langs; @@ -1049,6 +1051,15 @@ class Product extends CommonObject // language is not current language and we didn't provide a multilang description for this language } } + + // Call trigger + $result = $this->call_trigger('PRODUCT_SET_MULTILANGS',$user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + // End call triggers + return 1; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 96187fad8dd1dc66fa5a4826902c7b5853b9c9fd..3d97467f552eec028affbe471615c50027bdeb48 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -87,7 +87,7 @@ $cancel != $langs->trans("Cancel") && } // sauvegarde en base - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } @@ -123,7 +123,7 @@ $cancel != $langs->trans("Cancel") && } } - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } diff --git a/htdocs/theme/eldy/img/statut1.png b/htdocs/theme/eldy/img/statut1.png index 558439d282e451c5f0750dfb474e8c83d55fb6ee..88f3b3c53a0f778be1d756b37a020cbdb4eeb494 100644 Binary files a/htdocs/theme/eldy/img/statut1.png and b/htdocs/theme/eldy/img/statut1.png differ diff --git a/htdocs/theme/eldy/img/statut2.png b/htdocs/theme/eldy/img/statut2.png new file mode 100644 index 0000000000000000000000000000000000000000..ad5a7084474ac59240cd827b61e0dc4f03a521cc Binary files /dev/null and b/htdocs/theme/eldy/img/statut2.png differ diff --git a/htdocs/theme/eldy/img/statut4.png b/htdocs/theme/eldy/img/statut4.png index 6ec1ba559613fc19c80ae08681f3b47459cfd0bd..6dc05edeba79c3f792ea8554dae3608368360be9 100644 Binary files a/htdocs/theme/eldy/img/statut4.png and b/htdocs/theme/eldy/img/statut4.png differ diff --git a/htdocs/theme/eldy/img/statut6.png b/htdocs/theme/eldy/img/statut6.png index b964afff603903135c2e897900f1dddf3ffaf779..c76ab86fe601499d63e768104752c7ed1e4319ca 100644 Binary files a/htdocs/theme/eldy/img/statut6.png and b/htdocs/theme/eldy/img/statut6.png differ diff --git a/htdocs/theme/eldy/img/statut9.png b/htdocs/theme/eldy/img/statut9.png index 94b6dabf265571f7f830cc164413b84506526b67..9aa2ae34620a5b6e3760f7cbdfe468ab2f99f630 100644 Binary files a/htdocs/theme/eldy/img/statut9.png and b/htdocs/theme/eldy/img/statut9.png differ