Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop Conflicts: htdocs/core/class/extrafields.class.php
This commit is contained in:
commit
b4a8f19696
@ -67,7 +67,7 @@ llxHeader('',$langs->trans("DefaultRights"));
|
|||||||
print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
||||||
|
|
||||||
print $langs->trans("DefaultRightsDesc");
|
print $langs->trans("DefaultRightsDesc");
|
||||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br><br>\n";
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -115,16 +115,15 @@ foreach ($modulesdir as $dir)
|
|||||||
|
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
// Show warning about external users
|
|
||||||
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
|
|
||||||
$head=security_prepare_head();
|
$head=security_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'default', $langs->trans("Security"));
|
dol_fiche_head($head, 'default', $langs->trans("Security"));
|
||||||
|
|
||||||
|
|
||||||
|
// Show warning about external users
|
||||||
|
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
// Affiche lignes des permissions
|
// Affiche lignes des permissions
|
||||||
|
|||||||
@ -2243,7 +2243,11 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cancel order
|
// Cancel order
|
||||||
if ($object->statut == 1 && $user->rights->commande->annuler) {
|
if ($object->statut == 1 &&
|
||||||
|
((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->cloturer))
|
||||||
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->annuler)))
|
||||||
|
)
|
||||||
|
{
|
||||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel">' . $langs->trans('Cancel') . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel">' . $langs->trans('Cancel') . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -940,7 +940,7 @@ class Account extends CommonObject
|
|||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/WorkboardResponse.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
$response = new WorkboardResponse();
|
$response = new WorkboardResponse();
|
||||||
$response->warning_delay=$conf->bank->rappro->warning_delay/60/60/24;
|
$response->warning_delay=$conf->bank->rappro->warning_delay/60/60/24;
|
||||||
|
|||||||
@ -49,8 +49,8 @@ class WorkboardResponse
|
|||||||
public $url_late;
|
public $url_late;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delay time to mark an item as late
|
* Delay time to mark an item as late. In number of days.
|
||||||
* @var int
|
* @var double
|
||||||
*/
|
*/
|
||||||
public $warning_delay;
|
public $warning_delay;
|
||||||
|
|
||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2013-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2013-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2014-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -270,7 +271,7 @@ abstract class DoliDB implements Database
|
|||||||
*
|
*
|
||||||
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
* @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS)
|
||||||
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
|
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||||
* @return timestamp|string Date TMS
|
* @return int|string Date TMS
|
||||||
*/
|
*/
|
||||||
function jdate($string, $gm=false)
|
function jdate($string, $gm=false)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1157,7 +1157,7 @@ function dol_getdate($timestamp,$fast=false)
|
|||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @param mixed $gm True or 1 or 'gmt'=Input informations are GMT values, False or 0 or 'server' = local to server TZ, 'user' = local to user TZ
|
* @param mixed $gm True or 1 or 'gmt'=Input informations are GMT values, False or 0 or 'server' = local to server TZ, 'user' = local to user TZ
|
||||||
* @param int $check 0=No check on parameters (Can use day 32, etc...)
|
* @param int $check 0=No check on parameters (Can use day 32, etc...)
|
||||||
* @return timestamp|string Date as a timestamp, '' or false if error
|
* @return int|string Date as a timestamp, '' or false if error
|
||||||
* @see dol_print_date, dol_stringtotime, dol_getdate
|
* @see dol_print_date, dol_stringtotime, dol_getdate
|
||||||
*/
|
*/
|
||||||
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||||
@ -4952,7 +4952,7 @@ function dol_getmypid()
|
|||||||
* @param string $value The value to look for.
|
* @param string $value The value to look for.
|
||||||
* If param $numeric is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
|
* If param $numeric is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
|
||||||
* If param $numeric is 1, can contains an operator <>= like "<10" or ">=100.5 < 1000"
|
* If param $numeric is 1, can contains an operator <>= like "<10" or ">=100.5 < 1000"
|
||||||
* @param string $number 0=value is list of keywords, 1=value is a numeric test
|
* @param string $numeric 0=value is list of keywords, 1=value is a numeric test
|
||||||
* @return string $res The statement to append to the SQL query
|
* @return string $res The statement to append to the SQL query
|
||||||
*/
|
*/
|
||||||
function natural_search($fields, $value, $numeric=0)
|
function natural_search($fields, $value, $numeric=0)
|
||||||
|
|||||||
@ -591,12 +591,9 @@ class pdf_aurore extends ModelePDFAskPriceSupplier
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorConstantNotDefined","PROP_OUTPUTDIR");
|
$this->error=$langs->trans("ErrorConstantNotDefined","ASKSUPPLIERPICE_OUTPUTDIR");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->error=$langs->trans("ErrorUnknown");
|
|
||||||
return 0; // Erreur par defaut
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
@ -21,11 +21,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup askpricesupplier Module de demandes de prix fournisseurs
|
* \defgroup askpricesupplier Module to request supplier price proposals
|
||||||
* \brief Module pour gerer la tenue des demandes fournisseurs
|
* \brief Module to request supplier price proposals
|
||||||
* \file htdocs/core/modules/modAskPriceSupplier.class.php
|
* \file htdocs/core/modules/modAskPriceSupplier.class.php
|
||||||
* \ingroup askpricesupplier
|
* \ingroup askpricesupplier
|
||||||
* \brief Fichier de description et activation du module AskPriceSupplier
|
* \brief File to describe and activate module AskPriceSupplier
|
||||||
*/
|
*/
|
||||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||||
|
|
||||||
@ -110,7 +110,6 @@ class modAskPriceSupplier extends DolibarrModules
|
|||||||
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
$this->rights[$r][3] = 1; // La permission est-elle une permission par defaut
|
||||||
$this->rights[$r][4] = 'creer';
|
$this->rights[$r][4] = 'creer';
|
||||||
|
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = $this->numero + $r; // id de la permission
|
$this->rights[$r][0] = $this->numero + $r; // id de la permission
|
||||||
$this->rights[$r][1] = 'Validate supplier proposals'; // libelle de la permission
|
$this->rights[$r][1] = 'Validate supplier proposals'; // libelle de la permission
|
||||||
|
|||||||
@ -151,7 +151,8 @@ class modCommande extends DolibarrModules
|
|||||||
$this->rights[$r][1] = 'Annuler les commandes clients';
|
$this->rights[$r][1] = 'Annuler les commandes clients';
|
||||||
$this->rights[$r][2] = 'd';
|
$this->rights[$r][2] = 'd';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'annuler';
|
$this->rights[$r][4] = 'order_advance';
|
||||||
|
$this->rights[$r][5] = 'annuler';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 89;
|
$this->rights[$r][0] = 89;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class modContrat extends DolibarrModules
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf, $langs;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->numero = 54;
|
$this->numero = 54;
|
||||||
@ -118,10 +118,12 @@ class modContrat extends DolibarrModules
|
|||||||
|
|
||||||
// Exports
|
// Exports
|
||||||
//--------
|
//--------
|
||||||
|
$langs->load("contracts");
|
||||||
|
|
||||||
$r=1;
|
$r=1;
|
||||||
|
|
||||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
$this->export_label[$r]='ContractAndServices'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
$this->export_label[$r]=$langs->trans('ContractsAndLine'); // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
$this->export_icon[$r]='contract';
|
$this->export_icon[$r]='contract';
|
||||||
$this->export_permission[$r]=array(array("contrat","export"));
|
$this->export_permission[$r]=array(array("contrat","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode',
|
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode',
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
@ -177,6 +177,14 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->rights[$r][4] = 'commande';
|
$this->rights[$r][4] = 'commande';
|
||||||
$this->rights[$r][5] = 'receptionner';
|
$this->rights[$r][5] = 'receptionner';
|
||||||
|
|
||||||
|
$r++;
|
||||||
|
$this->rights[$r][0] = 1189;
|
||||||
|
$this->rights[$r][1] = 'Check/Uncheck a supplier order reception';
|
||||||
|
$this->rights[$r][2] = 'w';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'commande_advance';
|
||||||
|
$this->rights[$r][5] = 'check';
|
||||||
|
|
||||||
$r++;
|
$r++;
|
||||||
$this->rights[$r][0] = 1188;
|
$this->rights[$r][0] = 1188;
|
||||||
$this->rights[$r][1] = 'Supprimer une commande fournisseur';
|
$this->rights[$r][1] = 'Supprimer une commande fournisseur';
|
||||||
@ -251,11 +259,11 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_icon[$r]='bill';
|
$this->export_icon[$r]='bill';
|
||||||
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
|
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_buy'=>'ProductAccountancyBuyCode');
|
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_buy'=>'ProductAccountancyBuyCode');
|
||||||
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Number','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||||
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Number','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_buy'=>'product');
|
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_buy'=>'product');
|
||||||
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||||
// Add extra fields
|
// Add extra fields object
|
||||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||||
@ -288,13 +296,48 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_entities_array[$r][$fieldname]='invoice';
|
$this->export_entities_array[$r][$fieldname]='invoice';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End add axtra fields
|
// End add extra fields
|
||||||
|
// Add extra fields line
|
||||||
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn_det'";
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||||
|
{
|
||||||
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
|
{
|
||||||
|
$fieldname='extraline.'.$obj->name;
|
||||||
|
$fieldlabel=ucfirst($obj->label);
|
||||||
|
$typeFilter="Text";
|
||||||
|
switch($obj->type)
|
||||||
|
{
|
||||||
|
case 'int':
|
||||||
|
case 'double':
|
||||||
|
case 'price':
|
||||||
|
$typeFilter="Numeric";
|
||||||
|
break;
|
||||||
|
case 'date':
|
||||||
|
case 'datetime':
|
||||||
|
$typeFilter="Date";
|
||||||
|
break;
|
||||||
|
case 'boolean':
|
||||||
|
$typeFilter="Boolean";
|
||||||
|
break;
|
||||||
|
case 'sellist':
|
||||||
|
$typeFilter="List:".$obj->param;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||||
|
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||||
|
$this->export_entities_array[$r][$fieldname]='invoice_line';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// End add extra fields line
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_extrafields as extra ON f.rowid = extra.fk_object';
|
||||||
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'facture_fourn_det as fd';
|
$this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'facture_fourn_det as fd';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det_extrafields as extraline ON fd.rowid = extraline.fk_object';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn';
|
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn';
|
||||||
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice',1).')';
|
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice',1).')';
|
||||||
@ -309,7 +352,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
|
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
|
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
|
||||||
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||||
// Add extra fields
|
// Add extra fields object
|
||||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture_fourn'";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||||
@ -342,7 +385,7 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_entities_array[$r][$fieldname]='invoice';
|
$this->export_entities_array[$r][$fieldname]='invoice';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End add axtra fields
|
// End add extra fields object
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
||||||
@ -361,10 +404,10 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_icon[$r]='order';
|
$this->export_icon[$r]='order';
|
||||||
$this->export_permission[$r]=array(array("fournisseur","commande","export"));
|
$this->export_permission[$r]=array(array("fournisseur","commande","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note_public'=>"NotePublic",'f.note_private'=>"NotePrivate",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
|
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note_public'=>"NotePublic",'f.note_private'=>"NotePrivate",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
|
||||||
$this->export_TypeFields_array[$r]=array('s.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.fk_statut'=>'Status','f.note_public'=>"Text",'f.note_private'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Number",'fd.qty'=>"Number",'fd.remise_percent'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.total_tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
$this->export_TypeFields_array[$r]=array('s.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.fk_statut'=>'Status','f.note_public'=>"Text",'f.note_private'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Number",'fd.qty'=>"Number",'fd.remise_percent'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.total_tva'=>"Number",'fd.product_type'=>'Number','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note_public'=>"order",'f.note_private'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
|
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note_public'=>"order",'f.note_private'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
|
||||||
$this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
$this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||||
// Add extra fields
|
// Add extra fields object
|
||||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur'";
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur'";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||||
@ -397,13 +440,48 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_entities_array[$r][$fieldname]='order';
|
$this->export_entities_array[$r][$fieldname]='order';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End add axtra fields
|
// End add extra fields object
|
||||||
|
// Add extra fields line
|
||||||
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseurdet'";
|
||||||
|
$resql=$this->db->query($sql);
|
||||||
|
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||||
|
{
|
||||||
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
|
{
|
||||||
|
$fieldname='extraline.'.$obj->name;
|
||||||
|
$fieldlabel=ucfirst($obj->label);
|
||||||
|
$typeFilter="Text";
|
||||||
|
switch($obj->type)
|
||||||
|
{
|
||||||
|
case 'int':
|
||||||
|
case 'double':
|
||||||
|
case 'price':
|
||||||
|
$typeFilter="Numeric";
|
||||||
|
break;
|
||||||
|
case 'date':
|
||||||
|
case 'datetime':
|
||||||
|
$typeFilter="Date";
|
||||||
|
break;
|
||||||
|
case 'boolean':
|
||||||
|
$typeFilter="Boolean";
|
||||||
|
break;
|
||||||
|
case 'sellist':
|
||||||
|
$typeFilter="List:".$obj->param;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||||
|
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||||
|
$this->export_entities_array[$r][$fieldname]='order_line';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// End add extra fields line
|
||||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields as extraline ON fd.rowid = extraline.fk_object';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande';
|
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_commande';
|
||||||
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_order',1).')';
|
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_order',1).')';
|
||||||
|
|||||||
@ -67,7 +67,10 @@ $mesg='';
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'checkdispatchline')
|
if ($action == 'checkdispatchline' &&
|
||||||
|
! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner))
|
||||||
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
$result=$supplierorderdispatch->fetch($lineid);
|
$result=$supplierorderdispatch->fetch($lineid);
|
||||||
@ -81,7 +84,10 @@ if ($action == 'checkdispatchline')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'uncheckdispatchline')
|
if ($action == 'uncheckdispatchline' &&
|
||||||
|
! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner))
|
||||||
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check)))
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
$supplierorderdispatch = new CommandeFournisseurDispatch($db);
|
||||||
$result=$supplierorderdispatch->fetch($lineid);
|
$result=$supplierorderdispatch->fetch($lineid);
|
||||||
@ -630,6 +636,21 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Add button to check/uncheck disaptching
|
// Add button to check/uncheck disaptching
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
|
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande->receptionner))
|
||||||
|
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->fournisseur->commande_advance->check))
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (empty($objp->status))
|
||||||
|
{
|
||||||
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Check").'</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="button buttonRefused" href="#">'.$langs->trans("Uncheck").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$disabled='';
|
$disabled='';
|
||||||
if ($commande->statut == 5) $disabled=1;
|
if ($commande->statut == 5) $disabled=1;
|
||||||
if (empty($objp->status))
|
if (empty($objp->status))
|
||||||
@ -640,6 +661,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=uncheckdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Uncheck").'</a>';
|
print '<a class="button'.($disabled?' buttonRefused':'').'" href="'.$_SERVER["PHP_SELF"]."?id=".$id."&action=uncheckdispatchline&lineid=".$objp->dispatchlineid.'">'.$langs->trans("Uncheck").'</a>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -311,7 +311,7 @@ print '</tr>'."\n";
|
|||||||
// Do not include sections without management permission
|
// Do not include sections without management permission
|
||||||
//
|
//
|
||||||
|
|
||||||
require DOL_DOCUMENT_ROOT.'/core/class/WorkboardResponse.class.php';
|
require DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
// Number of actions to do (late)
|
// Number of actions to do (late)
|
||||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
||||||
|
|||||||
@ -19,6 +19,8 @@
|
|||||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_extrafields ADD COLUMN perms varchar(255) after fieldrequired;
|
||||||
|
|
||||||
ALTER TABLE llx_payment_salary ADD COLUMN salary real after datev;
|
ALTER TABLE llx_payment_salary ADD COLUMN salary real after datev;
|
||||||
|
|
||||||
UPDATE llx_projet_task_time SET task_datehour = task_date where task_datehour IS NULL;
|
UPDATE llx_projet_task_time SET task_datehour = task_date where task_datehour IS NULL;
|
||||||
|
|||||||
@ -29,6 +29,7 @@ create table llx_extrafields
|
|||||||
size varchar(8) DEFAULT NULL,
|
size varchar(8) DEFAULT NULL,
|
||||||
fieldunique integer DEFAULT 0,
|
fieldunique integer DEFAULT 0,
|
||||||
fieldrequired integer DEFAULT 0,
|
fieldrequired integer DEFAULT 0,
|
||||||
|
perms varchar(255),
|
||||||
pos integer DEFAULT 0,
|
pos integer DEFAULT 0,
|
||||||
alwayseditable integer DEFAULT 0,
|
alwayseditable integer DEFAULT 0,
|
||||||
param text
|
param text
|
||||||
|
|||||||
@ -500,6 +500,8 @@ Module700Name=Donations
|
|||||||
Module700Desc=Donation management
|
Module700Desc=Donation management
|
||||||
Module770Name=Expense Report
|
Module770Name=Expense Report
|
||||||
Module770Desc=Management and claim expense reports (transportation, meal, ...)
|
Module770Desc=Management and claim expense reports (transportation, meal, ...)
|
||||||
|
Module1120Name=Supplier commercial proposal
|
||||||
|
Module1120Desc=Request supplier commercial proposal and prices
|
||||||
Module1200Name=Mantis
|
Module1200Name=Mantis
|
||||||
Module1200Desc=Mantis integration
|
Module1200Desc=Mantis integration
|
||||||
Module1400Name=Accounting
|
Module1400Name=Accounting
|
||||||
|
|||||||
@ -19,6 +19,7 @@ ServiceStatusLateShort=Expired
|
|||||||
ServiceStatusClosed=Closed
|
ServiceStatusClosed=Closed
|
||||||
ServicesLegend=Services legend
|
ServicesLegend=Services legend
|
||||||
Contracts=Contracts
|
Contracts=Contracts
|
||||||
|
ContractsAndLine=Contracts and line of contracts
|
||||||
Contract=Contract
|
Contract=Contract
|
||||||
NoContracts=No contracts
|
NoContracts=No contracts
|
||||||
MenuServices=Services
|
MenuServices=Services
|
||||||
|
|||||||
@ -274,9 +274,9 @@ print '</tr>'."\n";
|
|||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"), 0, 1).'<br>';
|
if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
|
||||||
// Show warning about external users
|
// Show warning about external users
|
||||||
if (empty($user->societe_id)) print info_admin(showModulesExludedForExternal($modules)).'<br><br>'."\n";
|
if (empty($user->societe_id)) print info_admin(showModulesExludedForExternal($modules))."\n";
|
||||||
|
|
||||||
// For multicompany transversal mode
|
// For multicompany transversal mode
|
||||||
// TODO Place a hook here
|
// TODO Place a hook here
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user