Exemplo n.º 1
0
 /**
  *    	Return amount (with tax) of all deposits invoices used by invoice
  *
  *		@return		int			<0 if KO, Sum of deposits amount otherwise
  */
 function getSumDepositsUsed()
 {
     require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
     $discountstatic = new DiscountAbsolute($this->db);
     $result = $discountstatic->getSumDepositsUsed($this);
     if ($result >= 0) {
         return $result;
     } else {
         $this->error = $discountstatic->error;
         return -1;
     }
 }