2
0
forked from Wavyzz/dolibarr

Fix: carriage return

This commit is contained in:
Regis Houssin
2012-07-26 17:45:47 +02:00
parent c55eabeaff
commit 51ccb33964
52 changed files with 1603 additions and 1601 deletions

View File

@@ -111,37 +111,37 @@ class InterfacePaypalWorkflow
}
else
{
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
$soc = new Societe($this->db);
// Parse element/subelement (ex: project_task)
$element = $path = $filename = $object->source;
if (preg_match('/^([^_]+)_([^_]+)/i',$object->source,$regs))
{
$element = $path = $regs[1];
$filename = $regs[2];
}
// For compatibility
if ($element == 'order') {
$path = $filename = 'commande';
}
if ($element == 'invoice') {
$path = 'compta/facture'; $filename = 'facture';
}
dol_include_once('/'.$path.'/class/'.$filename.'.class.php');
$classname = ucfirst($filename);
$obj = new $classname($this->db);
$ret = $obj->fetch('',$object->ref);
if ($ret < 0) return -1;
// Add payer id
$soc->setValueFrom('ref_int', $object->payerID, 'societe', $obj->socid);
// Add transaction id
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
$soc = new Societe($this->db);
// Parse element/subelement (ex: project_task)
$element = $path = $filename = $object->source;
if (preg_match('/^([^_]+)_([^_]+)/i',$object->source,$regs))
{
$element = $path = $regs[1];
$filename = $regs[2];
}
// For compatibility
if ($element == 'order') {
$path = $filename = 'commande';
}
if ($element == 'invoice') {
$path = 'compta/facture'; $filename = 'facture';
}
dol_include_once('/'.$path.'/class/'.$filename.'.class.php');
$classname = ucfirst($filename);
$obj = new $classname($this->db);
$ret = $obj->fetch('',$object->ref);
if ($ret < 0) return -1;
// Add payer id
$soc->setValueFrom('ref_int', $object->payerID, 'societe', $obj->socid);
// Add transaction id
$obj->setValueFrom('ref_int',$object->resArray["TRANSACTIONID"]);
}