agin fix blockedlog on supplier incvoive payument
This commit is contained in:
parent
5f89b4427f
commit
a7655b69e8
@ -108,6 +108,17 @@ class BlockedLog
|
|||||||
$this->error++;
|
$this->error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if($this->element === 'invoice_supplier') {
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
|
|
||||||
|
$object = new FactureFournisseur($this->db);
|
||||||
|
if($object->fetch($this->fk_object)>0) {
|
||||||
|
return $object->getNomUrl(1);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if($this->element === 'payment') {
|
else if($this->element === 'payment') {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
|
||||||
@ -193,6 +204,23 @@ class BlockedLog
|
|||||||
$this->object_data->note_public = (double) $object->note_public;
|
$this->object_data->note_public = (double) $object->note_public;
|
||||||
$this->object_data->note_private= (double) $object->note_private;
|
$this->object_data->note_private= (double) $object->note_private;
|
||||||
|
|
||||||
|
}
|
||||||
|
if($this->element === 'invoice_supplier') {
|
||||||
|
if(empty($object->thirdparty))$object->fetch_thirdparty();
|
||||||
|
$this->object_data->thirdparty = new stdClass();
|
||||||
|
|
||||||
|
foreach($object->thirdparty as $key=>$value) {
|
||||||
|
if(!is_object($value)) $this->object_data->thirdparty->{$key} = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->object_data->total_ht = (double) $object->total_ht;
|
||||||
|
$this->object_data->total_tva = (double) $object->total_tva;
|
||||||
|
$this->object_data->total_ttc = (double) $object->total_ttc;
|
||||||
|
$this->object_data->total_localtax1= (double) $object->total_localtax1;
|
||||||
|
$this->object_data->total_localtax2= (double) $object->total_localtax2;
|
||||||
|
$this->object_data->note_public = (double) $object->note_public;
|
||||||
|
$this->object_data->note_private= (double) $object->note_private;
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif($this->element==='payment'|| $object->element=='payment_supplier'){
|
elseif($this->element==='payment'|| $object->element=='payment_supplier'){
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,8 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
|||||||
if (empty($conf->blockedlog->enabled)) return 0; // Module not active, we do nothing
|
if (empty($conf->blockedlog->enabled)) return 0; // Module not active, we do nothing
|
||||||
|
|
||||||
if($action==='BILL_VALIDATE' || $action === 'BILL_PAYED' || $action==='BILL_UNPAYED'
|
if($action==='BILL_VALIDATE' || $action === 'BILL_PAYED' || $action==='BILL_UNPAYED'
|
||||||
|| $action === 'BILL_SENTBYMAIL' || $action === 'DOC_DOWNLOAD' || $action === 'DOC_PREVIEW') {
|
|| $action === 'BILL_SENTBYMAIL' || $action === 'DOC_DOWNLOAD' || $action === 'DOC_PREVIEW'
|
||||||
|
|| $action === 'BILL_SUPPLIER_PAYED') {
|
||||||
$amounts= (double) $object->total_ttc;
|
$amounts= (double) $object->total_ttc;
|
||||||
}
|
}
|
||||||
else if($action === 'PAYMENT_CUSTOMER_CREATE' || $action === 'PAYMENT_ADD_TO_BANK') {
|
else if($action === 'PAYMENT_CUSTOMER_CREATE' || $action === 'PAYMENT_ADD_TO_BANK') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user