Merge
This commit is contained in:
commit
cf0a1d1e14
@ -328,7 +328,7 @@ if ($action == 'writebookkeeping') {
|
||||
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
||||
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||
$account_label = $accountingaccount->label;
|
||||
|
||||
// get compte id and label
|
||||
|
||||
@ -457,7 +457,7 @@ if ($action == 'writebookkeeping') {
|
||||
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
||||
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||
$label_account = $accountingaccount->label;
|
||||
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
|
||||
@ -479,7 +479,7 @@ if ($action == 'writebookkeeping') {
|
||||
|
||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
|
||||
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
|
||||
$label_account = $accountingaccount->label;
|
||||
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
|
||||
@ -183,7 +183,8 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') {
|
||||
}
|
||||
|
||||
// enable captcha by default
|
||||
$res = dolibarr_set_const($db, 'MAIN_SECURITY_ENABLECAPTCHA', 1, 'chaine', 0, '', $conf->entity);
|
||||
// TODO Add a visible option in this setup page for this
|
||||
$res = dolibarr_set_const($db, 'MAIN_SECURITY_ENABLECAPTCHA_TICKET', 1, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
|
||||
@ -1047,7 +1047,7 @@ if ($type == Categorie::TYPE_USER) {
|
||||
print '<input type="hidden" name="action" value="addintocategory">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print $langs->trans("AddProjectIntoCategory").' ';
|
||||
print $langs->trans("AddObjectIntoCategory").' ';
|
||||
print $form->select_dolusers('', 'elemid');
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -1873,7 +1873,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
// Predefine quantity according to packaging
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
$prod = new Product($this->db);
|
||||
$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid));
|
||||
|
||||
if ($qty < $prod->packaging) {
|
||||
|
||||
@ -2074,7 +2074,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) {
|
||||
// Check quantity is enough
|
||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
|
||||
$prod = new Product($this->db, $fk_product);
|
||||
$prod = new Product($this->db);
|
||||
if ($prod->fetch($fk_product) > 0) {
|
||||
$product_type = $prod->type;
|
||||
$label = $prod->label;
|
||||
|
||||
@ -599,7 +599,7 @@ if (empty($reshook)) {
|
||||
$localtax1_tx,
|
||||
$localtax2_tx,
|
||||
$idprod,
|
||||
0, // We already have the $idprod always defined
|
||||
$productsupplier->product_fourn_price_id,
|
||||
$ref_supplier,
|
||||
$remise_percent,
|
||||
$price_base_type,
|
||||
|
||||
@ -270,7 +270,7 @@ update llx_product set barcode = null where barcode in ('', '-1', '0');
|
||||
update llx_societe set barcode = null where barcode in ('', '-1', '0');
|
||||
|
||||
|
||||
-- Sequence to removed duplicated values of llx_links. Use several times if you still have duplicate.
|
||||
-- Sequence to removed duplicated values of llx_links. Run several times if you still have duplicate.
|
||||
drop table tmp_links_double;
|
||||
--select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2;
|
||||
create table tmp_links_double as (select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2);
|
||||
@ -279,7 +279,7 @@ delete from llx_links where (rowid, label) in (select max_rowid, label from tmp_
|
||||
drop table tmp_links_double;
|
||||
|
||||
|
||||
-- Sequence to removed duplicated values of barcode in llx_product. Use several times if you still have duplicate.
|
||||
-- Sequence to removed duplicated values of barcode in llx_product. Run several times if you still have duplicate.
|
||||
drop table tmp_product_double;
|
||||
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
create table tmp_product_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
@ -288,7 +288,7 @@ update llx_product set barcode = null where (rowid, barcode) in (select max_rowi
|
||||
drop table tmp_product_double;
|
||||
|
||||
|
||||
-- Sequence to removed duplicated values of barcode in llx_societe. Use several times if you still have duplicate.
|
||||
-- Sequence to removed duplicated values of barcode in llx_societe. Run several times if you still have duplicate.
|
||||
drop table tmp_societe_double;
|
||||
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2;
|
||||
create table tmp_societe_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2);
|
||||
@ -297,7 +297,7 @@ update llx_societe set barcode = null where (rowid, barcode) in (select max_rowi
|
||||
drop table tmp_societe_double;
|
||||
|
||||
|
||||
-- Sequence to removed duplicated values of llx_accounting_account. Use several times if you still have duplicate.
|
||||
-- Sequence to removed duplicated values of llx_accounting_account. Run several times if you still have duplicate.
|
||||
drop table tmp_accounting_account_double;
|
||||
--select account_number, fk_pcg_version, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_accounting_account where label is not null group by account_number, fk_pcg_version having count(rowid) >= 2;
|
||||
create table tmp_accounting_account_double as (select account_number, fk_pcg_version, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_accounting_account where label is not null group by account_number, fk_pcg_version having count(rowid) >= 2);
|
||||
@ -415,6 +415,11 @@ ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
|
||||
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
|
||||
|
||||
|
||||
UPDATE llx_facturedet SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
|
||||
UPDATE llx_facture_fourn_det SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
|
||||
UPDATE llx_expensereport_det SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
|
||||
|
||||
|
||||
-- VMYSQL4.1 update llx_projet_task_time set task_datehour = task_date where task_datehour < task_date or task_datehour > DATE_ADD(task_date, interval 1 day);
|
||||
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ DescVentilExpenseReportMore=If you setup accounting account on type of expense r
|
||||
DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account
|
||||
|
||||
Closure=Annual closure
|
||||
DescClosure=Consult here the number of movements by month who are not yet validated & locked
|
||||
DescClosure=Consult here the number of movements by month not yet validated & locked
|
||||
OverviewOfMovementsNotValidated=Overview of movements not validated and locked
|
||||
AllMovementsWereRecordedAsValidated=All movements were recorded as validated and locked
|
||||
NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated and locked
|
||||
|
||||
@ -109,7 +109,7 @@ NextValueForReplacements=Next value (replacements)
|
||||
MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to <b>%s</b> %s, irrespective of the value of this parameter
|
||||
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
|
||||
MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to disallow any upload)
|
||||
UseCaptchaCode=Use graphical code (CAPTCHA) on login page
|
||||
UseCaptchaCode=Use graphical code (CAPTCHA) on login page and some public pages
|
||||
AntiVirusCommand=Full path to antivirus command
|
||||
AntiVirusCommandExample=Example for ClamAv Daemon (require clamav-daemon): /usr/bin/clamdscan<br>Example for ClamWin (very very slow): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe
|
||||
AntiVirusParam= More parameters on command line
|
||||
|
||||
@ -100,3 +100,4 @@ ActionCommCategoriesArea=Event Categories
|
||||
WebsitePagesCategoriesArea=Page-Container Categories
|
||||
KnowledgemanagementsCategoriesArea=KM article Categories
|
||||
UseOrOperatorForCategories=Use 'OR' operator for categories
|
||||
AddObjectIntoCategory=Add object into category
|
||||
|
||||
@ -279,7 +279,7 @@ DescVentilExpenseReportMore=Si vous avez défini des comptes comptables au nivea
|
||||
DescVentilDoneExpenseReport=Consultez ici la liste des lignes des notes de frais et leur compte comptable
|
||||
|
||||
Closure=Clôture annuelle
|
||||
DescClosure=Consulter le nombre de mouvements par mois non validés et les périodes fiscales déjà ouvertes
|
||||
DescClosure=Consulter le nombre de mouvements par mois non validés et vérrouillés
|
||||
OverviewOfMovementsNotValidated=Aperçu des mouvements non validés et verrouillés
|
||||
AllMovementsWereRecordedAsValidated=Tous les mouvements ont été enregistrés comme validés et ont été verrouillés
|
||||
NotAllMovementsCouldBeRecordedAsValidated=Certains mouvements n'ont pas pu être enregistrés comme validés et n'ont pas été verrouillés
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
||||
//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
|
||||
@ -1933,10 +1933,8 @@ class Product extends CommonObject
|
||||
$sql = "SELECT pfp.rowid, pfp.price as price, pfp.quantity as quantity, pfp.remise_percent,";
|
||||
$sql .= " pfp.fk_product, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_soc, pfp.tva_tx, pfp.fk_supplier_price_expression,";
|
||||
$sql .= " pfp.default_vat_code,";
|
||||
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code";
|
||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
|
||||
$sql .= ", pfp.packaging";
|
||||
}
|
||||
$sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code,";
|
||||
$sql .= " pfp.packaging";
|
||||
$sql .= " FROM ".$this->db->prefix()."product_fournisseur_price as pfp";
|
||||
$sql .= " WHERE pfp.rowid = ".((int) $prodfournprice);
|
||||
if ($qty > 0) {
|
||||
|
||||
@ -105,6 +105,7 @@ if ($cancel) {
|
||||
$action = '';
|
||||
}
|
||||
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
||||
@ -209,7 +209,7 @@ if (empty($reshook) && $action == 'create_ticket' && GETPOST('save', 'alpha')) {
|
||||
}
|
||||
|
||||
// Check Captcha code if is enabled
|
||||
if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
|
||||
if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) || !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA_TICKET)) {
|
||||
$sessionkey = 'dol_antispam_value';
|
||||
$ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) === strtolower(GETPOST('code', 'restricthtml'))));
|
||||
if (!$ok) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user