codesniffer
This commit is contained in:
parent
d242f4930d
commit
4cbdf32ae6
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012-2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -24,9 +24,10 @@
|
|||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Put here description of your class
|
* File of class to manage predefined price products or services by customer
|
||||||
*/
|
*/
|
||||||
class Productcustomerprice extends CommonObject {
|
class Productcustomerprice extends CommonObject
|
||||||
|
{
|
||||||
var $db; // !< To store db handler
|
var $db; // !< To store db handler
|
||||||
var $error; // !< To return error code (or message)
|
var $error; // !< To return error code (or message)
|
||||||
var $errors = array (); // !< To return several error codes (or messages)
|
var $errors = array (); // !< To return several error codes (or messages)
|
||||||
@ -293,16 +294,12 @@ class Productcustomerprice extends CommonObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Load all objects in memory from database
|
* Load all objects in memory from database
|
||||||
*
|
*
|
||||||
* @param string $sortorder order
|
* @param string $sortorder order
|
||||||
* @param string $sortfield field
|
* @param string $sortfield field
|
||||||
* @param int $limit page
|
* @param int $limit page
|
||||||
* @param int $offset
|
* @param int $offset offset
|
||||||
* @param int $arch archive or not
|
|
||||||
* @param array $filter output
|
* @param array $filter output
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@ -403,15 +400,12 @@ class Productcustomerprice extends CommonObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Load all objects in memory from database
|
* Load all objects in memory from database
|
||||||
*
|
*
|
||||||
* @param string $sortorder order
|
* @param string $sortorder order
|
||||||
* @param string $sortfield field
|
* @param string $sortfield field
|
||||||
* @param int $limit page
|
* @param int $limit page
|
||||||
* @param int $offset
|
* @param int $offset offset
|
||||||
* @param int $arch archive or not
|
|
||||||
* @param array $filter output
|
* @param array $filter output
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
@ -703,8 +697,6 @@ class Productcustomerprice extends CommonObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* Force update price on child price
|
* Force update price on child price
|
||||||
*
|
*
|
||||||
* @param User $user that modifies
|
* @param User $user that modifies
|
||||||
@ -735,8 +727,7 @@ class Productcustomerprice extends CommonObject {
|
|||||||
$prodsocprice = new Productcustomerprice($this->db);
|
$prodsocprice = new Productcustomerprice($this->db);
|
||||||
|
|
||||||
$filter = array (
|
$filter = array (
|
||||||
't.fk_product' => $this->fk_product,
|
't.fk_product' => $this->fk_product,'t.fk_soc' => $obj->rowid
|
||||||
't.fk_soc'=> $obj->rowid
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$result = $prodsocprice->fetch_all('', '', 0, 0, $filter);
|
$result = $prodsocprice->fetch_all('', '', 0, 0, $filter);
|
||||||
@ -783,17 +774,14 @@ class Productcustomerprice extends CommonObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(get_class($this) . "::setPriceOnAffiliateThirdparty " . $this->error, LOG_ERR);
|
dol_syslog(get_class($this) . "::setPriceOnAffiliateThirdparty " . $this->error, LOG_ERR);
|
||||||
@ -930,7 +918,11 @@ class Productcustomerprice extends CommonObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PriceByCustomerLine {
|
/**
|
||||||
|
* File of class to manage predefined price products or services by customer lines
|
||||||
|
*/
|
||||||
|
class PriceByCustomerLine
|
||||||
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $entity;
|
var $entity;
|
||||||
var $datec = '';
|
var $datec = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user