can merge products but experimental
This commit is contained in:
parent
d9bcd27764
commit
429e5cf517
@ -2929,6 +2929,23 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to replace a product id with another one.
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param int $origin_id Old product id
|
||||||
|
* @param int $dest_id New product id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||||
|
{
|
||||||
|
$tables = array(
|
||||||
|
'facture_fourn_det'
|
||||||
|
);
|
||||||
|
|
||||||
|
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the payment of the supplier invoice having a delay?
|
* Is the payment of the supplier invoice having a delay?
|
||||||
*
|
*
|
||||||
|
|||||||
@ -321,11 +321,12 @@ if (empty($reshook)) {
|
|||||||
'Bom' => '/bom/class/bom.class.php',
|
'Bom' => '/bom/class/bom.class.php',
|
||||||
'Contrat' => '/contrat/class/contrat.class.php',
|
'Contrat' => '/contrat/class/contrat.class.php',
|
||||||
'Expedition' => '/expedition/class/expedition.class.php',
|
'Expedition' => '/expedition/class/expedition.class.php',
|
||||||
|
'Reception' => '/reception/class/reception.class.php',
|
||||||
'Fichinter' => '/fichinter/class/fichinter.class.php',
|
'Fichinter' => '/fichinter/class/fichinter.class.php',
|
||||||
'FichinterRec' => '/fichinter/class/fichinter.class.php',
|
'FichinterRec' => '/fichinter/class/fichinter.class.php',
|
||||||
'CommandeFournisseur' => '/fourn/class/fournisseur.commande.class.php',
|
'CommandeFournisseur' => '/fourn/class/fournisseur.commande.class.php',
|
||||||
// 'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php',
|
'FactureFournisseur' => '/fourn/class/fournisseur.facture.class.php',
|
||||||
// 'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php',
|
'SupplierProposal' => '/supplier_proposal/class/supplier_proposal.class.php',
|
||||||
// 'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php',
|
// 'ProductFournisseur' => '/fourn/class/fournisseur.product.class.php',
|
||||||
'Delivery' => '/delivery/class/delivery.class.php',
|
'Delivery' => '/delivery/class/delivery.class.php',
|
||||||
// 'Project' => '/projet/class/project.class.php',
|
// 'Project' => '/projet/class/project.class.php',
|
||||||
|
|||||||
@ -1949,4 +1949,21 @@ class Reception extends CommonObject
|
|||||||
|
|
||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to replace a product id with another one.
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param int $origin_id Old product id
|
||||||
|
* @param int $dest_id New product id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||||
|
{
|
||||||
|
$tables = array(
|
||||||
|
'commande_fournisseur_dispatch'
|
||||||
|
);
|
||||||
|
|
||||||
|
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2681,6 +2681,24 @@ class SupplierProposal extends CommonObject
|
|||||||
|
|
||||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to replace a product id with another one.
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param int $origin_id Old product id
|
||||||
|
* @param int $dest_id New product id
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
|
||||||
|
{
|
||||||
|
$tables = array(
|
||||||
|
'supplier_proposaldet'
|
||||||
|
);
|
||||||
|
|
||||||
|
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user