Work on split module fournisseur
This commit is contained in:
parent
2d77b9bdf0
commit
ab35b6b4f2
@ -49,10 +49,10 @@ if (!empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->commande->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) {
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) {
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
|
||||
@ -400,7 +400,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
'class'=>'CommandeFournisseur',
|
||||
'table'=>'commande_fournisseur',
|
||||
'datefieldname'=>'date_commande',
|
||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire,
|
||||
'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->commande->lire) || (!empty($conf->supplier_order->enabled) && $user->rights->supplier_order->lire),
|
||||
'lang'=>'orders'),
|
||||
'invoice_supplier'=>array(
|
||||
'name'=>"BillsSuppliers",
|
||||
@ -409,7 +409,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
'margin'=>'minus',
|
||||
'table'=>'facture_fourn',
|
||||
'datefieldname'=>'datef',
|
||||
'test'=>$conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire,
|
||||
'test'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire) || (!empty($conf->supplier_invoice->enabled) && $user->rights->supplier_invoice->lire),
|
||||
'lang'=>'bills'),
|
||||
'contract'=>array(
|
||||
'name'=>"Contracts",
|
||||
|
||||
@ -50,10 +50,10 @@ if (!empty($conf->facture->enabled)) {
|
||||
if (!empty($conf->commande->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) {
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_invoice->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
}
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) {
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
}
|
||||
if (!empty($conf->contrat->enabled)) {
|
||||
|
||||
@ -879,7 +879,7 @@ class pdf_squille extends ModelePdfReception
|
||||
$origin_id = $object->origin_id;
|
||||
|
||||
// TODO move to external function
|
||||
if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) { // commonly $origin='commande'
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled)) { // commonly $origin='commande'
|
||||
$outputlangs->load('orders');
|
||||
|
||||
$classname = 'CommandeFournisseur';
|
||||
|
||||
@ -192,7 +192,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// First classify billed the order to allow the proposal classify process
|
||||
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) {
|
||||
if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && !empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER)) {
|
||||
$object->fetchObjectLinked('', 'order_supplier', $object->id, $object->element);
|
||||
if (!empty($object->linkedObjects)) {
|
||||
$totalonlinkedelements = 0;
|
||||
|
||||
@ -132,9 +132,9 @@ class InterfaceNotification extends DolibarrTriggers
|
||||
$element = $obj->elementtype;
|
||||
|
||||
// Exclude events if related module is disabled
|
||||
if ($element == 'order_supplier' && (empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || empty($conf->supplier_order->enabled))) {
|
||||
if ($element == 'order_supplier' && ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_order->enabled))) {
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'invoice_supplier' && (empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || empty($conf->supplier_invoice->enabled))) {
|
||||
} elseif ($element == 'invoice_supplier' && ((empty($conf->fournisseur->enabled) && !empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || empty($conf->supplier_invoice->enabled))) {
|
||||
$qualified = 0;
|
||||
} elseif ($element == 'withdraw' && empty($conf->prelevement->enabled)) {
|
||||
$qualified = 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user