Merge branch 'develop' into new_branch_29_08_2018
This commit is contained in:
commit
b3c84ac3bc
@ -2,7 +2,7 @@
|
|||||||
# from Dolibarr GitHub repository.
|
# from Dolibarr GitHub repository.
|
||||||
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
|
||||||
|
|
||||||
# We use dist: precise to have php 5.3 available
|
# We use dist: trusty to have php 5.4+ available
|
||||||
dist: trusty
|
dist: trusty
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# DOLIBARR ERP & CRM
|
# DOLIBARR ERP & CRM
|
||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
|||||||
*/
|
*/
|
||||||
class AccountancyCategory // extends CommonObject
|
class AccountancyCategory // extends CommonObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|||||||
@ -80,15 +80,24 @@ class AccountingAccount extends CommonObject
|
|||||||
var $account_parent;
|
var $account_parent;
|
||||||
var $account_category;
|
var $account_category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string proper name for given parameter
|
* @var string Label of account
|
||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
var $fk_user_author;
|
/**
|
||||||
var $fk_user_modif;
|
* @var int ID
|
||||||
var $active; // duplicate with status
|
*/
|
||||||
var $status;
|
public $fk_user_author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
*/
|
||||||
|
public $fk_user_modif;
|
||||||
|
|
||||||
|
var $active; // duplicate with status
|
||||||
|
|
||||||
|
var $status;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -422,7 +431,7 @@ class AccountingAccount extends CommonObject
|
|||||||
* @param string $moretitle Add more text to title tooltip
|
* @param string $moretitle Add more text to title tooltip
|
||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1)
|
function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,7 +31,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
var $dirmodule;
|
var $dirmodule;
|
||||||
var $targetmodule;
|
var $targetmodule;
|
||||||
var $canvas;
|
var $canvas;
|
||||||
@ -41,11 +41,11 @@ abstract class ActionsAdherentCardCommon
|
|||||||
var $tpl = array();
|
var $tpl = array();
|
||||||
//! Object container
|
//! Object container
|
||||||
var $object;
|
var $object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
|
|||||||
@ -45,12 +45,12 @@ class Adherent extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='member';
|
public $element='member';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='adherent';
|
public $table_element='adherent';
|
||||||
|
|
||||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
var $mesgs;
|
var $mesgs;
|
||||||
@ -542,10 +542,10 @@ class Adherent extends CommonObject
|
|||||||
$luser->birth=$this->birth;
|
$luser->birth=$this->birth;
|
||||||
$luser->address=$this->address;
|
$luser->address=$this->address;
|
||||||
$luser->zip=$this->zip;
|
$luser->zip=$this->zip;
|
||||||
$luser->town=$this->town;
|
$luser->town=$this->town;
|
||||||
$luser->country_id=$this->country_id;
|
$luser->country_id=$this->country_id;
|
||||||
$luser->state_id=$this->state_id;
|
$luser->state_id=$this->state_id;
|
||||||
|
|
||||||
$luser->email=$this->email;
|
$luser->email=$this->email;
|
||||||
$luser->skype=$this->skype;
|
$luser->skype=$this->skype;
|
||||||
$luser->office_phone=$this->phone;
|
$luser->office_phone=$this->phone;
|
||||||
|
|||||||
@ -1250,8 +1250,13 @@ if ($id > 0)
|
|||||||
if (! empty($object->fk_element) && ! empty($object->elementtype))
|
if (! empty($object->fk_element) && ! empty($object->elementtype))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
print '<tr><td>'.$langs->trans("LinkedObject").'</td>';
|
print '<tr>';
|
||||||
print '<td>'.dolGetElementUrl($object->fk_element,$object->elementtype,1).'</td></tr>';
|
print '<td>'.$langs->trans("LinkedObject").'</td>';
|
||||||
|
print '<td>'.dolGetElementUrl($object->fk_element,$object->elementtype,1);
|
||||||
|
print '<input type="hidden" name="fk_element" value="'.$object->fk_element.'">';
|
||||||
|
print '<input type="hidden" name="elementtype" value="'.$object->elementtype.'">';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
|
|||||||
@ -28,30 +28,30 @@
|
|||||||
*/
|
*/
|
||||||
class AdvanceTargetingMailing extends CommonObject
|
class AdvanceTargetingMailing extends CommonObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='advtargetemailing';
|
public $element='advtargetemailing';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='advtargetemailing';
|
public $table_element='advtargetemailing';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
|
|||||||
@ -30,7 +30,7 @@ class FormAdvTargetEmailing extends Form
|
|||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
@ -378,10 +378,10 @@ class FormAdvTargetEmailing extends Form
|
|||||||
/**
|
/**
|
||||||
* Return combo list of categories
|
* Return combo list of categories
|
||||||
*
|
*
|
||||||
* @param string $htmlname Name of categorie
|
* @param string $htmlname Name of categorie
|
||||||
* @param array $selected_array value selected
|
* @param array $selected_array Value selected
|
||||||
* @param int $type type
|
* @param int $type Type
|
||||||
* @return string HTML combo
|
* @return string HTML combo
|
||||||
*/
|
*/
|
||||||
public function multiselectCategories($htmlname='',$selected_array = array(), $type=0)
|
public function multiselectCategories($htmlname='',$selected_array = array(), $type=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1514,7 +1514,7 @@ if ($action == 'create')
|
|||||||
// Bank Account
|
// Bank Account
|
||||||
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled)) {
|
if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && ! empty($conf->banque->enabled)) {
|
||||||
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>';
|
print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>';
|
||||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
$form->select_comptes($soc->fk_account, 'fk_account', 0, '', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -32,13 +32,13 @@ class Localtax extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='localtax';
|
public $element='localtax';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='localtax';
|
public $table_element='localtax';
|
||||||
|
|
||||||
public $picto='payment';
|
public $picto='payment';
|
||||||
|
|
||||||
var $ltt;
|
var $ltt;
|
||||||
@ -46,12 +46,12 @@ class Localtax extends CommonObject
|
|||||||
var $datep;
|
var $datep;
|
||||||
var $datev;
|
var $datev;
|
||||||
var $amount;
|
var $amount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string proper name for given parameter
|
* @var string proper name for given parameter
|
||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
var $fk_bank;
|
var $fk_bank;
|
||||||
var $fk_user_creat;
|
var $fk_user_creat;
|
||||||
var $fk_user_modif;
|
var $fk_user_modif;
|
||||||
|
|||||||
@ -716,5 +716,3 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage comment
|
* Class to manage comment
|
||||||
*/
|
*/
|
||||||
@ -8,11 +25,11 @@ class Comment extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='comment';
|
public $element='comment';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='comment';
|
public $table_element='comment';
|
||||||
|
|
||||||
public $fk_element;
|
public $fk_element;
|
||||||
public $element_type;
|
public $element_type;
|
||||||
|
|||||||
@ -46,58 +46,58 @@ abstract class CommonObject
|
|||||||
* @var DoliDb Database handler (result of a new DoliDB)
|
* @var DoliDb Database handler (result of a new DoliDB)
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int The object identifier
|
* @var int The object identifier
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error string
|
* @var string Error string
|
||||||
* @see errors
|
* @see errors
|
||||||
*/
|
*/
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Array of error strings
|
* @var string[] Array of error strings
|
||||||
*/
|
*/
|
||||||
public $errors=array();
|
public $errors=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element;
|
public $element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element;
|
public $table_element;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var
|
* @var
|
||||||
*/
|
*/
|
||||||
public $table_element_line;
|
public $table_element_line;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Key value used to track if data is coming from import wizard
|
* @var string Key value used to track if data is coming from import wizard
|
||||||
*/
|
*/
|
||||||
public $import_key;
|
public $import_key;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var mixed Contains data to manage extrafields
|
* @var mixed Contains data to manage extrafields
|
||||||
*/
|
*/
|
||||||
public $array_options=array();
|
public $array_options=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int[][] Array of linked objects ids. Loaded by ->fetchObjectLinked
|
* @var int[][] Array of linked objects ids. Loaded by ->fetchObjectLinked
|
||||||
*/
|
*/
|
||||||
public $linkedObjectsIds;
|
public $linkedObjectsIds;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var mixed Array of linked objects. Loaded by ->fetchObjectLinked
|
* @var mixed Array of linked objects. Loaded by ->fetchObjectLinked
|
||||||
*/
|
*/
|
||||||
public $linkedObjects;
|
public $linkedObjects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Object To store a cloned copy of object before to edit it and keep track of old properties
|
* @var Object To store a cloned copy of object before to edit it and keep track of old properties
|
||||||
*/
|
*/
|
||||||
@ -127,13 +127,13 @@ abstract class CommonObject
|
|||||||
* @see fetch_projet()
|
* @see fetch_projet()
|
||||||
*/
|
*/
|
||||||
public $project;
|
public $project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int The related project ID
|
* @var int The related project ID
|
||||||
* @see setProject(), project
|
* @see setProject(), project
|
||||||
*/
|
*/
|
||||||
public $fk_project;
|
public $fk_project;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see project
|
* @see project
|
||||||
@ -145,7 +145,7 @@ abstract class CommonObject
|
|||||||
* @see fetch_contact()
|
* @see fetch_contact()
|
||||||
*/
|
*/
|
||||||
public $contact;
|
public $contact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int The related contact ID
|
* @var int The related contact ID
|
||||||
* @see fetch_contact()
|
* @see fetch_contact()
|
||||||
@ -179,17 +179,17 @@ abstract class CommonObject
|
|||||||
* @var string The object's reference
|
* @var string The object's reference
|
||||||
*/
|
*/
|
||||||
public $ref;
|
public $ref;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The object's previous reference
|
* @var string The object's previous reference
|
||||||
*/
|
*/
|
||||||
public $ref_previous;
|
public $ref_previous;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The object's next reference
|
* @var string The object's next reference
|
||||||
*/
|
*/
|
||||||
public $ref_next;
|
public $ref_next;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string An external reference for the object
|
* @var string An external reference for the object
|
||||||
*/
|
*/
|
||||||
@ -206,43 +206,43 @@ abstract class CommonObject
|
|||||||
* @see getFullAddress()
|
* @see getFullAddress()
|
||||||
*/
|
*/
|
||||||
public $country;
|
public $country;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
* @see getFullAddress(), country
|
* @see getFullAddress(), country
|
||||||
*/
|
*/
|
||||||
public $country_id;
|
public $country_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress(), isInEEC(), country
|
* @see getFullAddress(), isInEEC(), country
|
||||||
*/
|
*/
|
||||||
public $country_code;
|
public $country_code;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress()
|
* @see getFullAddress()
|
||||||
*/
|
*/
|
||||||
public $state;
|
public $state;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
* @see getFullAddress(), state
|
* @see getFullAddress(), state
|
||||||
*/
|
*/
|
||||||
public $state_id;
|
public $state_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress(), state
|
* @see getFullAddress(), state
|
||||||
*/
|
*/
|
||||||
public $state_code;
|
public $state_code;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress(), region
|
* @see getFullAddress(), region
|
||||||
*/
|
*/
|
||||||
public $region;
|
public $region;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see getFullAddress(), region
|
* @see getFullAddress(), region
|
||||||
@ -254,19 +254,19 @@ abstract class CommonObject
|
|||||||
* @see fetch_barcode()
|
* @see fetch_barcode()
|
||||||
*/
|
*/
|
||||||
public $barcode_type;
|
public $barcode_type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see fetch_barcode(), barcode_type
|
* @see fetch_barcode(), barcode_type
|
||||||
*/
|
*/
|
||||||
public $barcode_type_code;
|
public $barcode_type_code;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see fetch_barcode(), barcode_type
|
* @see fetch_barcode(), barcode_type
|
||||||
*/
|
*/
|
||||||
public $barcode_type_label;
|
public $barcode_type_label;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see fetch_barcode(), barcode_type
|
* @see fetch_barcode(), barcode_type
|
||||||
@ -284,7 +284,7 @@ abstract class CommonObject
|
|||||||
* @see setPaymentTerms()
|
* @see setPaymentTerms()
|
||||||
*/
|
*/
|
||||||
public $cond_reglement_id;
|
public $cond_reglement_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Payment terms ID
|
* @var int Payment terms ID
|
||||||
* @deprecated Kept for compatibility
|
* @deprecated Kept for compatibility
|
||||||
@ -322,13 +322,13 @@ abstract class CommonObject
|
|||||||
* @see update_note()
|
* @see update_note()
|
||||||
*/
|
*/
|
||||||
public $note_public;
|
public $note_public;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Private note
|
* @var string Private note
|
||||||
* @see update_note()
|
* @see update_note()
|
||||||
*/
|
*/
|
||||||
public $note_private;
|
public $note_private;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see note_public
|
* @see note_public
|
||||||
@ -340,25 +340,25 @@ abstract class CommonObject
|
|||||||
* @see update_price()
|
* @see update_price()
|
||||||
*/
|
*/
|
||||||
public $total_ht;
|
public $total_ht;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float Total VAT amount
|
* @var float Total VAT amount
|
||||||
* @see update_price()
|
* @see update_price()
|
||||||
*/
|
*/
|
||||||
public $total_tva;
|
public $total_tva;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float Total local tax 1 amount
|
* @var float Total local tax 1 amount
|
||||||
* @see update_price()
|
* @see update_price()
|
||||||
*/
|
*/
|
||||||
public $total_localtax1;
|
public $total_localtax1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float Total local tax 2 amount
|
* @var float Total local tax 2 amount
|
||||||
* @see update_price()
|
* @see update_price()
|
||||||
*/
|
*/
|
||||||
public $total_localtax2;
|
public $total_localtax2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var float Total amount with taxes
|
* @var float Total amount with taxes
|
||||||
* @see update_price()
|
* @see update_price()
|
||||||
@ -381,13 +381,13 @@ abstract class CommonObject
|
|||||||
* @see setIncoterms()
|
* @see setIncoterms()
|
||||||
*/
|
*/
|
||||||
public $fk_incoterms;
|
public $fk_incoterms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see SetIncoterms()
|
* @see SetIncoterms()
|
||||||
*/
|
*/
|
||||||
public $libelle_incoterms;
|
public $libelle_incoterms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
* @see display_incoterms()
|
* @see display_incoterms()
|
||||||
@ -3760,7 +3760,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$num = count($this->lines);
|
$num = count($this->lines);
|
||||||
|
|
||||||
//Line extrafield
|
// Line extrafield
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
$extrafieldsline = new ExtraFields($this->db);
|
$extrafieldsline = new ExtraFields($this->db);
|
||||||
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($this->table_element_line);
|
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($this->table_element_line);
|
||||||
@ -3769,6 +3769,7 @@ abstract class CommonObject
|
|||||||
$reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
// Title line
|
||||||
print "<thead>\n";
|
print "<thead>\n";
|
||||||
|
|
||||||
print '<tr class="liste_titre nodrag nodrop">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
@ -3860,7 +3861,6 @@ abstract class CommonObject
|
|||||||
//Line extrafield
|
//Line extrafield
|
||||||
$line->fetch_optionals();
|
$line->fetch_optionals();
|
||||||
|
|
||||||
|
|
||||||
//if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
|
//if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line)))
|
||||||
if (is_object($hookmanager)) // Old code is commented on preceding line.
|
if (is_object($hookmanager)) // Old code is commented on preceding line.
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Events class
|
* Events class
|
||||||
*/
|
*/
|
||||||
class Events // extends CommonObject
|
class Events // extends CommonObject
|
||||||
{
|
{
|
||||||
@ -38,18 +38,18 @@ class Events // extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='events';
|
public $element='events';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='events';
|
public $table_element='events';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|||||||
@ -31,17 +31,17 @@ class Menubase
|
|||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
@ -696,4 +696,3 @@ class Menubase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -163,6 +163,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
|
|||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($pu === '') $pu=0;
|
||||||
// pu_devise calculation from pu
|
// pu_devise calculation from pu
|
||||||
if (empty($pu_devise) && !empty($multicurrency_tx)) {
|
if (empty($pu_devise) && !empty($multicurrency_tx)) {
|
||||||
if (is_numeric($pu) && is_numeric($multicurrency_tx)) $pu_devise = $pu * $multicurrency_tx;
|
if (is_numeric($pu) && is_numeric($multicurrency_tx)) $pu_devise = $pu * $multicurrency_tx;
|
||||||
|
|||||||
@ -176,6 +176,10 @@ class InterfaceStripe
|
|||||||
if ($customer) {
|
if ($customer) {
|
||||||
$customer->delete();
|
$customer->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account";
|
||||||
|
$sql.= " WHERE site='stripe' AND fk_soc = " . $object->id;
|
||||||
|
$this->db->query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If payment mode is linked to Strip, we update/delete Stripe too
|
// If payment mode is linked to Strip, we update/delete Stripe too
|
||||||
|
|||||||
@ -34,12 +34,12 @@ class Cronjob extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='cronjob';
|
public $element='cronjob';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='cronjob';
|
public $table_element='cronjob';
|
||||||
|
|
||||||
public $picto = 'cron';
|
public $picto = 'cron';
|
||||||
|
|
||||||
public $entity;
|
public $entity;
|
||||||
|
|||||||
@ -32,13 +32,13 @@ class PaymentDonation extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='payment_donation';
|
public $element='payment_donation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='payment_donation';
|
public $table_element='payment_donation';
|
||||||
|
|
||||||
public $picto = 'payment';
|
public $picto = 'payment';
|
||||||
|
|
||||||
public $rowid;
|
public $rowid;
|
||||||
@ -76,7 +76,7 @@ class PaymentDonation extends CommonObject
|
|||||||
* Use this->amounts to have list of lines for the payment
|
* Use this->amounts to have list of lines for the payment
|
||||||
*
|
*
|
||||||
* @param User $user User making payment
|
* @param User $user User making payment
|
||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
* @return int <0 if KO, id of payment if OK
|
* @return int <0 if KO, id of payment if OK
|
||||||
*/
|
*/
|
||||||
function create($user, $notrigger=false)
|
function create($user, $notrigger=false)
|
||||||
|
|||||||
@ -31,8 +31,8 @@ class ExpeditionLineBatch extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='expeditionlignebatch';
|
public $element='expeditionlignebatch';
|
||||||
|
|
||||||
private static $_table_element='expeditiondet_batch'; //!< Name of table without prefix where object is stored
|
private static $_table_element='expeditiondet_batch'; //!< Name of table without prefix where object is stored
|
||||||
|
|
||||||
var $sellby;
|
var $sellby;
|
||||||
@ -63,15 +63,15 @@ class ExpeditionLineBatch extends CommonObject
|
|||||||
function fetchFromStock($id_stockdluo)
|
function fetchFromStock($id_stockdluo)
|
||||||
{
|
{
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
$sql.= " pb.batch,";
|
$sql.= " pb.batch,";
|
||||||
$sql.= " pl.sellby,";
|
$sql.= " pl.sellby,";
|
||||||
$sql.= " pl.eatby,";
|
$sql.= " pl.eatby,";
|
||||||
$sql.= " ps.fk_entrepot";
|
$sql.= " ps.fk_entrepot";
|
||||||
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as pb";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as pb";
|
||||||
$sql.= " JOIN ".MAIN_DB_PREFIX."product_stock as ps on pb.fk_product_stock=ps.rowid";
|
$sql.= " JOIN ".MAIN_DB_PREFIX."product_stock as ps on pb.fk_product_stock=ps.rowid";
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product";
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product";
|
||||||
$sql.= " WHERE pb.rowid = ".(int) $id_stockdluo;
|
$sql.= " WHERE pb.rowid = ".(int) $id_stockdluo;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -37,12 +37,12 @@ class ExpenseReport extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='expensereport';
|
public $element='expensereport';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='expensereport';
|
public $table_element='expensereport';
|
||||||
|
|
||||||
var $table_element_line = 'expensereport_det';
|
var $table_element_line = 'expensereport_det';
|
||||||
var $fk_element = 'fk_expensereport';
|
var $fk_element = 'fk_expensereport';
|
||||||
var $picto = 'trip';
|
var $picto = 'trip';
|
||||||
@ -2390,7 +2390,7 @@ class ExpenseReportLine
|
|||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -44,22 +44,22 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='order_supplier';
|
public $element='order_supplier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='commande_fournisseur';
|
public $table_element='commande_fournisseur';
|
||||||
|
|
||||||
public $table_element_line = 'commande_fournisseurdet';
|
public $table_element_line = 'commande_fournisseurdet';
|
||||||
public $fk_element = 'fk_commande';
|
public $fk_element = 'fk_commande';
|
||||||
public $picto='order';
|
public $picto='order';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||||
* @var integer
|
* @var integer
|
||||||
@ -78,7 +78,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $ref;
|
public $ref;
|
||||||
|
|
||||||
public $ref_supplier;
|
public $ref_supplier;
|
||||||
public $brouillon;
|
public $brouillon;
|
||||||
public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
||||||
@ -3099,7 +3099,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='commande_fournisseurdet';
|
public $element='commande_fournisseurdet';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -34,26 +34,26 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php";
|
|||||||
*/
|
*/
|
||||||
class CommandeFournisseurDispatch extends CommonObject
|
class CommandeFournisseurDispatch extends CommonObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='commandefournisseurdispatch';
|
public $element='commandefournisseurdispatch';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -45,22 +45,22 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='invoice_supplier';
|
public $element='invoice_supplier';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='facture_fourn';
|
public $table_element='facture_fourn';
|
||||||
|
|
||||||
public $table_element_line='facture_fourn_det';
|
public $table_element_line='facture_fourn_det';
|
||||||
public $fk_element='fk_facture_fourn';
|
public $fk_element='fk_facture_fourn';
|
||||||
public $picto='bill';
|
public $picto='bill';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||||
* @var integer
|
* @var integer
|
||||||
@ -110,13 +110,13 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
public $total_localtax1=0;
|
public $total_localtax1=0;
|
||||||
public $total_localtax2=0;
|
public $total_localtax2=0;
|
||||||
public $total_ttc=0;
|
public $total_ttc=0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see note_private, note_public
|
* @see note_private, note_public
|
||||||
*/
|
*/
|
||||||
public $note;
|
public $note;
|
||||||
|
|
||||||
public $note_private;
|
public $note_private;
|
||||||
public $note_public;
|
public $note_public;
|
||||||
public $propalid;
|
public $propalid;
|
||||||
@ -675,7 +675,9 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
function fetch_lines()
|
function fetch_lines()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
|
$this->lines = array();
|
||||||
|
|
||||||
|
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
|
||||||
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn ';
|
$sql.= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn ';
|
||||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
||||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||||
@ -685,7 +687,6 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$sql.= ' WHERE fk_facture_fourn='.$this->id;
|
$sql.= ' WHERE fk_facture_fourn='.$this->id;
|
||||||
$sql.= ' ORDER BY f.rang, f.rowid';
|
$sql.= ' ORDER BY f.rang, f.rowid';
|
||||||
|
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
|
||||||
$resql_rows = $this->db->query($sql);
|
$resql_rows = $this->db->query($sql);
|
||||||
if ($resql_rows)
|
if ($resql_rows)
|
||||||
@ -703,6 +704,9 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$line->id = $obj->rowid;
|
$line->id = $obj->rowid;
|
||||||
$line->rowid = $obj->rowid;
|
$line->rowid = $obj->rowid;
|
||||||
$line->description = $obj->description;
|
$line->description = $obj->description;
|
||||||
|
$line->date_start = $obj->date_start;
|
||||||
|
$line->date_end = $obj->date_end;
|
||||||
|
|
||||||
$line->product_ref = $obj->product_ref;
|
$line->product_ref = $obj->product_ref;
|
||||||
$line->ref = $obj->product_ref;
|
$line->ref = $obj->product_ref;
|
||||||
$line->ref_supplier = $obj->ref_supplier;
|
$line->ref_supplier = $obj->ref_supplier;
|
||||||
@ -1736,7 +1740,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='')
|
public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1=0, $txlocaltax2=0, $qty=1, $idproduct=0, $price_base_type='HT', $info_bits=0, $type=0, $remise_percent=0, $notrigger=false, $date_start='', $date_end='', $array_options=0, $fk_unit = null, $pu_ht_devise=0, $ref_supplier='')
|
||||||
{
|
{
|
||||||
global $mysoc;
|
global $mysoc;
|
||||||
dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG);
|
dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG);
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||||
|
|
||||||
$pu = price2num($pu);
|
$pu = price2num($pu);
|
||||||
@ -1816,6 +1820,9 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
$line->remise_percent = $remise_percent;
|
$line->remise_percent = $remise_percent;
|
||||||
$line->ref_supplier = $ref_supplier;
|
$line->ref_supplier = $ref_supplier;
|
||||||
|
|
||||||
|
$line->date_start = $date_start;
|
||||||
|
$line->date_end = $date_end;
|
||||||
|
|
||||||
$line->vat_src_code=$vat_src_code;
|
$line->vat_src_code=$vat_src_code;
|
||||||
$line->tva_tx = $vatrate;
|
$line->tva_tx = $vatrate;
|
||||||
$line->localtax1_tx = $txlocaltax1;
|
$line->localtax1_tx = $txlocaltax1;
|
||||||
@ -2572,7 +2579,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='facture_fourn_det';
|
public $element='facture_fourn_det';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
@ -2585,7 +2592,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
* @see product_ref
|
* @see product_ref
|
||||||
*/
|
*/
|
||||||
public $ref;
|
public $ref;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal ref
|
* Internal ref
|
||||||
* @var string
|
* @var string
|
||||||
@ -2604,7 +2611,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
* @see label
|
* @see label
|
||||||
*/
|
*/
|
||||||
public $libelle;
|
public $libelle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product description
|
* Product description
|
||||||
* @var string
|
* @var string
|
||||||
@ -2618,7 +2625,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
* @see subprice
|
* @see subprice
|
||||||
*/
|
*/
|
||||||
public $pu_ht;
|
public $pu_ht;
|
||||||
|
|
||||||
public $subprice;
|
public $subprice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2634,7 +2641,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
* @see total_tva
|
* @see total_tva
|
||||||
*/
|
*/
|
||||||
public $tva;
|
public $tva;
|
||||||
|
|
||||||
public $total_tva;
|
public $total_tva;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2656,6 +2663,9 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public $description;
|
public $description;
|
||||||
|
|
||||||
|
public $date_start;
|
||||||
|
public $date_end;
|
||||||
|
|
||||||
public $skip_update_total; // Skip update price total for special lines
|
public $skip_update_total; // Skip update price total for special lines
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2713,7 +2723,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public function fetch($rowid)
|
public function fetch($rowid)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
|
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx';
|
||||||
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
$sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 ';
|
||||||
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
$sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit';
|
||||||
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
$sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc';
|
||||||
@ -2740,6 +2750,8 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$this->rowid = $obj->rowid;
|
$this->rowid = $obj->rowid;
|
||||||
$this->fk_facture_fourn = $obj->fk_facture_fourn;
|
$this->fk_facture_fourn = $obj->fk_facture_fourn;
|
||||||
$this->description = $obj->description;
|
$this->description = $obj->description;
|
||||||
|
$this->date_start = $obj->date_start;
|
||||||
|
$this->date_end = $obj->date_end;
|
||||||
$this->product_ref = $obj->product_ref;
|
$this->product_ref = $obj->product_ref;
|
||||||
$this->ref_supplier = $obj->ref_supplier;
|
$this->ref_supplier = $obj->ref_supplier;
|
||||||
$this->libelle = $obj->label;
|
$this->libelle = $obj->label;
|
||||||
@ -2871,6 +2883,8 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET";
|
||||||
$sql.= " description ='".$this->db->escape($this->description)."'";
|
$sql.= " description ='".$this->db->escape($this->description)."'";
|
||||||
$sql.= ", ref ='".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'";
|
$sql.= ", ref ='".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'";
|
||||||
|
$sql.= ", date_start = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : "null");
|
||||||
|
$sql.= ", date_end = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : "null");
|
||||||
$sql.= ", pu_ht = ".price2num($this->pu_ht);
|
$sql.= ", pu_ht = ".price2num($this->pu_ht);
|
||||||
$sql.= ", pu_ttc = ".price2num($this->pu_ttc);
|
$sql.= ", pu_ttc = ".price2num($this->pu_ttc);
|
||||||
$sql.= ", qty = ".price2num($this->qty);
|
$sql.= ", qty = ".price2num($this->qty);
|
||||||
@ -3045,12 +3059,11 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$sql.= ", ".price2num($this->multicurrency_total_ttc);
|
$sql.= ", ".price2num($this->multicurrency_total_ttc);
|
||||||
$sql.= ')';
|
$sql.= ')';
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::insert", LOG_DEBUG);
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
$this->id=$this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||||
$this->rowid=$this->id;
|
$this->rowid=$this->id; // backward compatibility
|
||||||
|
|
||||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1097,6 +1097,7 @@ if (empty($reshook))
|
|||||||
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
$product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):'');
|
||||||
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||||
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
$date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||||
|
|
||||||
$prod_entry_mode = GETPOST('prod_entry_mode');
|
$prod_entry_mode = GETPOST('prod_entry_mode');
|
||||||
if ($prod_entry_mode == 'free')
|
if ($prod_entry_mode == 'free')
|
||||||
{
|
{
|
||||||
@ -1211,7 +1212,7 @@ if (empty($reshook))
|
|||||||
if(!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
if(!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) {
|
||||||
$desc = $productsupplier->desc_supplier;
|
$desc = $productsupplier->desc_supplier;
|
||||||
} else $desc = $productsupplier->description;
|
} else $desc = $productsupplier->description;
|
||||||
|
|
||||||
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc);
|
||||||
|
|
||||||
$type = $productsupplier->type;
|
$type = $productsupplier->type;
|
||||||
@ -2427,7 +2428,7 @@ else
|
|||||||
$discount = new DiscountAbsolute($db);
|
$discount = new DiscountAbsolute($db);
|
||||||
$result = $discount->fetch(0, 0, $object->id);
|
$result = $discount->fetch(0, 0, $object->id);
|
||||||
if ($result > 0){
|
if ($result > 0){
|
||||||
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(), $discount->getNomUrl(1, 'discount')).'<br>';
|
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -172,7 +172,7 @@ if (! empty($force_install_message))
|
|||||||
?>
|
?>
|
||||||
<ul>
|
<ul>
|
||||||
<li>/var/lib/dolibarr/documents</li>
|
<li>/var/lib/dolibarr/documents</li>
|
||||||
<li>C:/My Documents/dolibarr/</li>
|
<li>C:/My Documents/dolibarr/documents</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -201,6 +201,7 @@ if (! empty($force_install_message))
|
|||||||
<ul>
|
<ul>
|
||||||
<li>http://localhost/</li>
|
<li>http://localhost/</li>
|
||||||
<li>http://www.myserver.com:8180/dolibarr</li>
|
<li>http://www.myserver.com:8180/dolibarr</li>
|
||||||
|
<li>https://www.myvirtualfordolibarr.com/</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -382,7 +383,7 @@ if (! empty($force_install_message))
|
|||||||
} ?>
|
} ?>
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
<td class="comment"><?php echo $langs->trans("DatabasePrefix"); ?></td>
|
<td class="comment"><?php echo $langs->trans("DatabasePrefixDescription"); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="hidesqlite">
|
<tr class="hidesqlite">
|
||||||
|
|||||||
@ -566,7 +566,7 @@ function detect_dolibarr_main_url_root()
|
|||||||
$dolibarr_main_url_root = $_SERVER["SERVER_URL"] . $_SERVER["DOCUMENT_URI"];
|
$dolibarr_main_url_root = $_SERVER["SERVER_URL"] . $_SERVER["DOCUMENT_URI"];
|
||||||
} // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows)
|
} // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows)
|
||||||
else {
|
else {
|
||||||
$proto = 'http';
|
$proto = ( (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http';
|
||||||
if (!empty($_SERVER["HTTP_HOST"])) {
|
if (!empty($_SERVER["HTTP_HOST"])) {
|
||||||
$serverport = $_SERVER["HTTP_HOST"];
|
$serverport = $_SERVER["HTTP_HOST"];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -50,13 +50,14 @@ ServerPortDescription=Database server port. Keep empty if unknown.
|
|||||||
DatabaseServer=Database server
|
DatabaseServer=Database server
|
||||||
DatabaseName=Database name
|
DatabaseName=Database name
|
||||||
DatabasePrefix=Database table prefix
|
DatabasePrefix=Database table prefix
|
||||||
|
DatabasePrefixDescription=Database table prefix. If empty, defaults to llx_.
|
||||||
AdminLogin=User account for the Dolibarr database owner.
|
AdminLogin=User account for the Dolibarr database owner.
|
||||||
PasswordAgain=Retype password confirmation
|
PasswordAgain=Retype password confirmation
|
||||||
AdminPassword=Password for Dolibarr database owner.
|
AdminPassword=Password for Dolibarr database owner.
|
||||||
CreateDatabase=Create database
|
CreateDatabase=Create database
|
||||||
CreateUser=Create user account or grant user account permission on the Dolibarr database
|
CreateUser=Create user account or grant user account permission on the Dolibarr database
|
||||||
DatabaseSuperUserAccess=Database server - Superuser access
|
DatabaseSuperUserAccess=Database server - Superuser access
|
||||||
CheckToCreateDatabase=Check the box if the database does not exist yet and so must be created.<br>In this case, you must fill in the user name and password for the superuser account at the bottom of this page.
|
CheckToCreateDatabase=Check the box if the database does not exist yet and so must be created.<br>In this case, you must also fill in the user name and password for the superuser account at the bottom of this page.
|
||||||
CheckToCreateUser=Check the box if:<br>the database user account does not yet exist and so must be created, or<br>if the user account exists but the database does not exist and permissions must be granted.<br>In this case, you must enter the user account and password and <b>also</b> the superuser account name and password at the bottom of this page. If this box is unchecked, database owner and password must already exist.
|
CheckToCreateUser=Check the box if:<br>the database user account does not yet exist and so must be created, or<br>if the user account exists but the database does not exist and permissions must be granted.<br>In this case, you must enter the user account and password and <b>also</b> the superuser account name and password at the bottom of this page. If this box is unchecked, database owner and password must already exist.
|
||||||
DatabaseRootLoginDescription=Superuser account name (to create new databases or new users), mandatory if the database or its owner does not already exist.
|
DatabaseRootLoginDescription=Superuser account name (to create new databases or new users), mandatory if the database or its owner does not already exist.
|
||||||
KeepEmptyIfNoPassword=Leave empty if superuser has no password (NOT recommended)
|
KeepEmptyIfNoPassword=Leave empty if superuser has no password (NOT recommended)
|
||||||
|
|||||||
@ -188,6 +188,7 @@ NumberOfUnitsSupplierInvoices=Number of units on supplier invoices
|
|||||||
EMailTextInterventionAddedContact=A new intervention %s has been assigned to you.
|
EMailTextInterventionAddedContact=A new intervention %s has been assigned to you.
|
||||||
EMailTextInterventionValidated=The intervention %s has been validated.
|
EMailTextInterventionValidated=The intervention %s has been validated.
|
||||||
EMailTextInvoiceValidated=The invoice %s has been validated.
|
EMailTextInvoiceValidated=The invoice %s has been validated.
|
||||||
|
EMailTextInvoicePayed=The invoice %s has been payed.
|
||||||
EMailTextProposalValidated=The proposal %s has been validated.
|
EMailTextProposalValidated=The proposal %s has been validated.
|
||||||
EMailTextProposalClosedSigned=The proposal %s has been closed signed.
|
EMailTextProposalClosedSigned=The proposal %s has been closed signed.
|
||||||
EMailTextOrderValidated=The order %s has been validated.
|
EMailTextOrderValidated=The order %s has been validated.
|
||||||
|
|||||||
@ -189,11 +189,11 @@ TicketGoIntoContactTab=Please go into "Contacts" tab to select them
|
|||||||
TicketMessageMailIntro=Introduction
|
TicketMessageMailIntro=Introduction
|
||||||
TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved.
|
TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved.
|
||||||
TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email
|
TicketMessageMailIntroLabelAdmin=Introduction to the message when sending email
|
||||||
TicketMessageMailIntroText=<p> Hello </ p> A new response was sent on a ticket that you contact. Here is the message: </ p>
|
TicketMessageMailIntroText=Hello,<br>A new response was sent on a ticket that you contact. Here is the message:<br>
|
||||||
TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket.
|
TicketMessageMailIntroHelpAdmin=This text will be inserted before the text of the response to a ticket.
|
||||||
TicketMessageMailSignature=Signature
|
TicketMessageMailSignature=Signature
|
||||||
TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved.
|
TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved.
|
||||||
TicketMessageMailSignatureText=<p>Cordialement,</p><p>--</p>
|
TicketMessageMailSignatureText=<p>Sincerely,</p><p>--</p>
|
||||||
TicketMessageMailSignatureLabelAdmin=Signature of response email
|
TicketMessageMailSignatureLabelAdmin=Signature of response email
|
||||||
TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
|
TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
|
||||||
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
|
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
|
||||||
|
|||||||
@ -35,7 +35,7 @@ AgendaAutoActionDesc= Définissez ici les événements pour lesquels Dolibarr cr
|
|||||||
AgendaSetupOtherDesc= Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (Thunderbird, Google calendar, …)
|
AgendaSetupOtherDesc= Cette page permet de configurer quelques options permettant d'exporter une vue de votre agenda Dolibarr vers un calendrier externe (Thunderbird, Google calendar, …)
|
||||||
AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr.
|
AgendaExtSitesDesc=Cette page permet d'ajouter des sources de calendriers externes pour les visualiser au sein de l'agenda Dolibarr.
|
||||||
ActionsEvents=Événements pour lesquels Dolibarr doit insérer un évènement dans l'agenda en automatique.
|
ActionsEvents=Événements pour lesquels Dolibarr doit insérer un évènement dans l'agenda en automatique.
|
||||||
EventRemindersByEmailNotEnabled=Les rappels d'événements par email n'ont pas été activés dans la configuration du module Agenda.
|
EventRemindersByEmailNotEnabled=Les rappels d'événements par email n'ont pas été activés dans la configuration du module %s.
|
||||||
##### Agenda event labels #####
|
##### Agenda event labels #####
|
||||||
NewCompanyToDolibarr=Tiers %s créé
|
NewCompanyToDolibarr=Tiers %s créé
|
||||||
ContractValidatedInDolibarr=Contrat %s validé
|
ContractValidatedInDolibarr=Contrat %s validé
|
||||||
|
|||||||
@ -188,6 +188,7 @@ NumberOfUnitsSupplierInvoices=Quantités présentes dans les factures fournisseu
|
|||||||
EMailTextInterventionAddedContact=Une nouvelle intervention %s vous a été assignée
|
EMailTextInterventionAddedContact=Une nouvelle intervention %s vous a été assignée
|
||||||
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
|
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
|
||||||
EMailTextInvoiceValidated=La facture %s vous concernant a été validée.
|
EMailTextInvoiceValidated=La facture %s vous concernant a été validée.
|
||||||
|
EMailTextInvoicePayed=La facture %s a été payée.
|
||||||
EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée.
|
EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée.
|
||||||
EMailTextProposalClosedSigned=La proposition %s a été clôturée signée.
|
EMailTextProposalClosedSigned=La proposition %s a été clôturée signée.
|
||||||
EMailTextOrderValidated=La commande %s vous concernant a été validée.
|
EMailTextOrderValidated=La commande %s vous concernant a été validée.
|
||||||
|
|||||||
@ -33,9 +33,9 @@ class Loan extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='loan';
|
public $element='loan';
|
||||||
|
|
||||||
public $table='loan';
|
public $table='loan';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/loan/class/loanschedule.class.php
|
* \file htdocs/loan/class/loanschedule.class.php
|
||||||
* \ingroup facture
|
* \ingroup loan
|
||||||
* \brief File of class to manage schedule of loans
|
* \brief File of class to manage schedule of loans
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||||
@ -33,11 +33,11 @@ class LoanSchedule extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='loan_schedule';
|
public $element='loan_schedule';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='loan_schedule';
|
public $table_element='loan_schedule';
|
||||||
|
|
||||||
var $fk_loan;
|
var $fk_loan;
|
||||||
var $datec='';
|
var $datec='';
|
||||||
@ -547,4 +547,3 @@ class LoanSchedule extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,11 +34,11 @@ class PaymentLoan extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='payment_loan';
|
public $element='payment_loan';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='payment_loan';
|
public $table_element='payment_loan';
|
||||||
|
|
||||||
var $fk_loan;
|
var $fk_loan;
|
||||||
var $datec='';
|
var $datec='';
|
||||||
|
|||||||
@ -38,12 +38,12 @@ class Opensurveysondage extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='opensurvey_sondage';
|
public $element='opensurvey_sondage';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='opensurvey_sondage';
|
public $table_element='opensurvey_sondage';
|
||||||
|
|
||||||
public $picto = 'opensurvey';
|
public $picto = 'opensurvey';
|
||||||
|
|
||||||
public $id_sondage;
|
public $id_sondage;
|
||||||
|
|||||||
@ -71,6 +71,8 @@ function opensurvey_prepare_head(Opensurveysondage $object)
|
|||||||
*/
|
*/
|
||||||
function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
|
function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
|
||||||
{
|
{
|
||||||
|
global $conf, $mysoc;
|
||||||
|
|
||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
|
||||||
print '<body id="mainbody" class="publicnewmemberform" style="margin-top: 10px;">';
|
print '<body id="mainbody" class="publicnewmemberform" style="margin-top: 10px;">';
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ class Productbatch extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='productbatch';
|
public $element='productbatch';
|
||||||
|
|
||||||
private static $_table_element='product_batch'; //!< Name of table without prefix where object is stored
|
private static $_table_element='product_batch'; //!< Name of table without prefix where object is stored
|
||||||
|
|
||||||
var $tms='';
|
var $tms='';
|
||||||
|
|||||||
@ -31,13 +31,13 @@ class Productcustomerprice extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element = 'product_customer_price';
|
public $element = 'product_customer_price';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'product_customer_price';
|
public $table_element = 'product_customer_price';
|
||||||
|
|
||||||
var $entity;
|
var $entity;
|
||||||
var $datec = '';
|
var $datec = '';
|
||||||
var $tms = '';
|
var $tms = '';
|
||||||
@ -962,7 +962,7 @@ class PriceByCustomerLine
|
|||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
var $entity;
|
var $entity;
|
||||||
var $datec = '';
|
var $datec = '';
|
||||||
var $tms = '';
|
var $tms = '';
|
||||||
|
|||||||
@ -34,12 +34,12 @@ class Propalmergepdfproduct extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='propal_merge_pdf_product';
|
public $element='propal_merge_pdf_product';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='propal_merge_pdf_product';
|
public $table_element='propal_merge_pdf_product';
|
||||||
|
|
||||||
var $fk_product;
|
var $fk_product;
|
||||||
var $file_name;
|
var $file_name;
|
||||||
|
|||||||
@ -249,14 +249,20 @@ if (empty($reshook))
|
|||||||
if (isset($_POST['ref_fourn_price_id']))
|
if (isset($_POST['ref_fourn_price_id']))
|
||||||
$object->fetch_product_fournisseur_price($_POST['ref_fourn_price_id']);
|
$object->fetch_product_fournisseur_price($_POST['ref_fourn_price_id']);
|
||||||
|
|
||||||
if ($conf->multicurrency->enabled) {
|
$newprice = price2num(GETPOST("price","alpha"));
|
||||||
$ret = $object->update_buyprice($quantity, $_POST["price"], $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', $_POST["multicurrency_price"], $_POST["multicurrency_price_base_type"], $_POST["multicurrency_tx"], $_POST["multicurrency_code"], $supplier_description);
|
|
||||||
|
if ($conf->multicurrency->enabled)
|
||||||
|
{
|
||||||
|
$multicurrency_tx = price2num(GETPOST("multicurrency_tx",'alpha'));
|
||||||
|
$multicurrency_price = price2num(GETPOST("multicurrency_price",'alpha'));
|
||||||
|
$multicurrency_code = GETPOST("multicurrency_code",'alpha');
|
||||||
|
|
||||||
|
$ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', $multicurrency_price, $_POST["multicurrency_price_base_type"], $multicurrency_tx, $multicurrency_code, $supplier_description);
|
||||||
} else {
|
} else {
|
||||||
$ret = $object->update_buyprice($quantity, $_POST["price"], $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', 0, 'HT', 1, '', $supplier_description);
|
$ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', 0, 'HT', 1, '', $supplier_description);
|
||||||
}
|
}
|
||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
@ -566,7 +572,7 @@ if ($id > 0 || $ref)
|
|||||||
// Currency price qty min
|
// Currency price qty min
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMinCurrency").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMinCurrency").'</td>';
|
||||||
$pricesupplierincurrencytouse=(GETPOST('multicurrency_price')?GETPOST('multicurrency_price'):(isset($object->fourn_multicurrency_price)?$object->fourn_multicurrency_price:''));
|
$pricesupplierincurrencytouse=(GETPOST('multicurrency_price')?GETPOST('multicurrency_price'):(isset($object->fourn_multicurrency_price)?$object->fourn_multicurrency_price:''));
|
||||||
print '<td><input class="flat" name="multicurrency_price" size="8" value="'.$pricesupplierincurrencytouse.'">';
|
print '<td><input class="flat" name="multicurrency_price" size="8" value="'.price($pricesupplierincurrencytouse).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type')?GETPOST('multicurrency_price_base_type'):'HT'), "multicurrency_price_base_type"); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices
|
print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type')?GETPOST('multicurrency_price_base_type'):'HT'), "multicurrency_price_base_type"); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -678,18 +684,18 @@ SCRIPT;
|
|||||||
{
|
{
|
||||||
//WYSIWYG Editor
|
//WYSIWYG Editor
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('ProductSupplierDescription').'</td>';
|
print '<td>'.$langs->trans('ProductSupplierDescription').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
$doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
|
$doleditor = new DolEditor('supplier_description', $object->desc_supplier, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%');
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($hookmanager))
|
if (is_object($hookmanager))
|
||||||
{
|
{
|
||||||
$parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$object->id);
|
$parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$object->id);
|
||||||
|
|||||||
@ -36,13 +36,13 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element = 'project';
|
public $element = 'project';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'projet';
|
public $table_element = 'projet';
|
||||||
|
|
||||||
public $table_element_line = 'projet_task';
|
public $table_element_line = 'projet_task';
|
||||||
public $fk_element = 'fk_projet';
|
public $fk_element = 'fk_projet';
|
||||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
@ -732,10 +732,10 @@ class Project extends CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete tasks with no children first, then task with children recursively
|
* Delete tasks with no children first, then task with children recursively
|
||||||
*
|
*
|
||||||
* @param User $user User
|
* @param User $user User
|
||||||
* @return int <0 if KO, 1 if OK
|
* @return int <0 if KO, 1 if OK
|
||||||
*/
|
*/
|
||||||
@ -763,7 +763,7 @@ class Project extends CommonObject
|
|||||||
{
|
{
|
||||||
if (count($this->lines)) $this->deleteTasks($this->lines);
|
if (count($this->lines)) $this->deleteTasks($this->lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,24 +34,24 @@ class Task extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element='project_task';
|
public $element='project_task';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element='projet_task';
|
public $table_element='projet_task';
|
||||||
|
|
||||||
public $fk_element='fk_task';
|
public $fk_element='fk_task';
|
||||||
public $picto = 'task';
|
public $picto = 'task';
|
||||||
protected $childtables=array('projet_task_time'); // To test if we can delete object
|
protected $childtables=array('projet_task_time'); // To test if we can delete object
|
||||||
|
|
||||||
var $fk_task_parent;
|
public $fk_task_parent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string proper name for given parameter
|
* @var string Label of task
|
||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
var $description;
|
var $description;
|
||||||
var $duration_effective; // total of time spent on this task
|
var $duration_effective; // total of time spent on this task
|
||||||
var $planned_workload;
|
var $planned_workload;
|
||||||
|
|||||||
@ -38,27 +38,27 @@ class Ticket extends CommonObject
|
|||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element = 'ticket';
|
public $element = 'ticket';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'ticket';
|
public $table_element = 'ticket';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of field for link to tickets
|
* @var string Name of field for link to tickets
|
||||||
*/
|
*/
|
||||||
public $fk_element='fk_ticket';
|
public $fk_element='fk_ticket';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Does ticketcore support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
* @var int Does ticketcore support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 0;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Does ticketcore support extrafields ? 0=No, 1=Yes
|
* @var int Does ticketcore support extrafields ? 0=No, 1=Yes
|
||||||
*/
|
*/
|
||||||
public $isextrafieldmanaged = 1;
|
public $isextrafieldmanaged = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string String with name of icon for ticketcore. Must be the part after the 'object_' into object_ticketcore.png
|
* @var string String with name of icon for ticketcore. Must be the part after the 'object_' into object_ticketcore.png
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -36,26 +36,26 @@ class Ticketlogs// extends CommonObject
|
|||||||
* @var DoliDB Database handler.
|
* @var DoliDB Database handler.
|
||||||
*/
|
*/
|
||||||
public $db;
|
public $db;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Error code (or message)
|
* @var string Error code (or message)
|
||||||
*/
|
*/
|
||||||
public $error;
|
public $error;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Error codes (or messages)
|
* @var string[] Error codes (or messages)
|
||||||
*/
|
*/
|
||||||
public $errors = array();
|
public $errors = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string ID to identify managed object
|
* @var string ID to identify managed object
|
||||||
*/
|
*/
|
||||||
public $element = 'ticketlogs';
|
public $element = 'ticketlogs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored
|
public $table_element = 'ticketlogs'; //!< Name of table without prefix where object is stored
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
|
|||||||
@ -88,9 +88,9 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$result = $object->fetch($id, $ref, '', 1);
|
$result = $object->fetch($id, $ref, '', 1);
|
||||||
$object->getrights();
|
$object->getrights();
|
||||||
$entitytouseforuserdir = $object->entity;
|
//$upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ;
|
||||||
if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1;
|
// For users, the upload_dir is always $conf->user->entity for the moment
|
||||||
$upload_dir = $conf->user->multidir_output[$entitytouseforuserdir] . "/" . $object->id ;
|
$upload_dir = $conf->user->dir_output. "/" . $object->id ;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
|||||||
@ -228,7 +228,7 @@ if (preg_match('/\.\./',$fullpath_original_file) || preg_match('/[<>|]/',$fullpa
|
|||||||
if ($modulepart == 'barcode')
|
if ($modulepart == 'barcode')
|
||||||
{
|
{
|
||||||
$generator=GETPOST("generator","alpha");
|
$generator=GETPOST("generator","alpha");
|
||||||
$code=GETPOST("code",'alpha');
|
$code=GETPOST("code",'none'); // This can be rich content (qrcode, datamatrix, ...)
|
||||||
$encoding=GETPOST("encoding","alpha");
|
$encoding=GETPOST("encoding","alpha");
|
||||||
$readable=GETPOST("readable",'alpha')?GETPOST("readable","alpha"):"Y";
|
$readable=GETPOST("readable",'alpha')?GETPOST("readable","alpha"):"Y";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user