Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
32f5b4efa6
@ -221,14 +221,16 @@ abstract class CommonObject
|
|||||||
* @param int $rowid Id of line contact-element
|
* @param int $rowid Id of line contact-element
|
||||||
* @param int $statut New status of link
|
* @param int $statut New status of link
|
||||||
* @param int $type_contact_id Id of contact type (not modified if 0)
|
* @param int $type_contact_id Id of contact type (not modified if 0)
|
||||||
|
* @param int $fk_socpeople Id of soc_people to update (not modified if 0)
|
||||||
* @return int <0 if KO, >= 0 if OK
|
* @return int <0 if KO, >= 0 if OK
|
||||||
*/
|
*/
|
||||||
function update_contact($rowid, $statut, $type_contact_id=0)
|
function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0)
|
||||||
{
|
{
|
||||||
// Insertion dans la base
|
// Insertion dans la base
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set";
|
||||||
$sql.= " statut = ".$statut;
|
$sql.= " statut = ".$statut;
|
||||||
if ($type_contact_id) $sql.= ", fk_c_type_contact = '".$type_contact_id ."'";
|
if ($type_contact_id) $sql.= ", fk_c_type_contact = '".$type_contact_id ."'";
|
||||||
|
if ($fk_socpeople) $sql.= ", fk_socpeople = '".$fk_socpeople ."'";
|
||||||
$sql.= " where rowid = ".$rowid;
|
$sql.= " where rowid = ".$rowid;
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -115,7 +115,8 @@ class HookManager
|
|||||||
* @param Object &$object Object to use hooks on
|
* @param Object &$object Object to use hooks on
|
||||||
* @param string &$action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
* @param string &$action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
||||||
* @return mixed For doActions,formObjectOptions: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
|
* @return mixed For doActions,formObjectOptions: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
|
||||||
* For printSearchForm,printLeftBlock,printTopRightMenu,...: Return HTML string.
|
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Must always return an int and things to print into ->resprints.
|
||||||
|
* Can also return some values into an array ->results.
|
||||||
* $this->error or this->errors are also defined by class called by this function if error.
|
* $this->error or this->errors are also defined by class called by this function if error.
|
||||||
*/
|
*/
|
||||||
function executeHooks($method, $parameters=false, &$object='', &$action='')
|
function executeHooks($method, $parameters=false, &$object='', &$action='')
|
||||||
@ -127,45 +128,58 @@ class HookManager
|
|||||||
|
|
||||||
// Loop on each hook to qualify modules that declared context
|
// Loop on each hook to qualify modules that declared context
|
||||||
$modulealreadyexecuted=array();
|
$modulealreadyexecuted=array();
|
||||||
$resaction=0; $resprint='';
|
$resaction=0; $error=0;
|
||||||
|
$this->resPrint=''; $this->resArray=array();
|
||||||
foreach($this->hooks as $modules) // this->hooks is an array with context as key and value is an array of modules that handle this context
|
foreach($this->hooks as $modules) // this->hooks is an array with context as key and value is an array of modules that handle this context
|
||||||
{
|
{
|
||||||
if (! empty($modules))
|
if (! empty($modules))
|
||||||
{
|
{
|
||||||
foreach($modules as $module => $actionclassinstance)
|
foreach($modules as $module => $actionclassinstance)
|
||||||
{
|
{
|
||||||
// test to avoid to run twice a hook, when a module implements several active contexts
|
// jump to next class if method does not exists
|
||||||
|
if (! method_exists($actionclassinstance,$method)) continue;
|
||||||
|
// test to avoid to run twice a hook, when a module implements several active contexts
|
||||||
if (in_array($module,$modulealreadyexecuted)) continue;
|
if (in_array($module,$modulealreadyexecuted)) continue;
|
||||||
$modulealreadyexecuted[$module]=$module;
|
$modulealreadyexecuted[$module]=$module;
|
||||||
|
|
||||||
// Hooks that return int
|
// Hooks that return int
|
||||||
if (($method == 'doActions' || $method == 'formObjectOptions') && method_exists($actionclassinstance,$method))
|
if (($method == 'doActions' || $method == 'formObjectOptions'))
|
||||||
{
|
{
|
||||||
$resaction+=$actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
$resaction+=$actionclassinstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
||||||
if ($resaction < 0 || ! empty($actionclassinstance->error) || (! empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0))
|
if ($resaction < 0 || ! empty($actionclassinstance->error) || (! empty($actionclassinstance->errors) && count($actionclassinstance->errors) > 0))
|
||||||
{
|
{
|
||||||
$this->error=$actionclassinstance->error; $this->errors=array_merge($this->errors, (array) $actionclassinstance->errors);
|
$error++;
|
||||||
if ($method == 'doActions')
|
$this->error=$actionclassinstance->error; $this->errors=array_merge($this->errors, (array) $actionclassinstance->errors);
|
||||||
{
|
// TODO remove this. Change must be inside the method if required
|
||||||
if ($action=='add') $action='create'; // TODO this change must be inside the doActions
|
if ($method == 'doActions')
|
||||||
if ($action=='update') $action='edit'; // TODO this change must be inside the doActions
|
{
|
||||||
}
|
if ($action=='add') $action='create';
|
||||||
}
|
if ($action=='update') $action='edit';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Generic hooks that return a string (printSearchForm, printLeftBlock, formBuilddocOptions, ...)
|
// Generic hooks that return a string (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
|
||||||
else if (method_exists($actionclassinstance,$method))
|
else
|
||||||
{
|
{
|
||||||
if (is_array($parameters) && ! empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue;
|
// TODO. this should be done into the method by returning nothing
|
||||||
|
if (is_array($parameters) && ! empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) continue;
|
||||||
|
|
||||||
$result = $actionclassinstance->$method($parameters, $object, $action, $this);
|
$result = $actionclassinstance->$method($parameters, $object, $action, $this);
|
||||||
|
|
||||||
|
if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
|
||||||
|
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
|
||||||
|
|
||||||
|
// TODO. remove this. array result must be set into $actionclassinstance->results
|
||||||
if (is_array($result)) $this->resArray = array_merge($this->resArray, $result);
|
if (is_array($result)) $this->resArray = array_merge($this->resArray, $result);
|
||||||
else $resprint.=$result;
|
// TODO. remove this. result must not be a string. we must use $actionclassinstance->resprint to return a string
|
||||||
|
if (! is_array($result) && ! is_numeric($result)) $this->resPrint.=$result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($method == 'doActions' || $method == 'formObjectOptions') return $resaction;
|
if ($method != 'doActions' && $method != 'formObjectOptions') return $this->resPrint; // TODO remove this. When there is something to print, ->resPrint is filled.
|
||||||
return $resprint;
|
return ($error?-1:$resaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,6 +165,10 @@ class Form
|
|||||||
{
|
{
|
||||||
$ret.=$this->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$value,$htmlname);
|
$ret.=$this->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$value,$htmlname);
|
||||||
}
|
}
|
||||||
|
else if ($typeofdata == 'datehourpicker')
|
||||||
|
{
|
||||||
|
$ret.=$this->form_date($_SERVER['PHP_SELF'].'?id='.$object->id,$value,$htmlname,1,1);
|
||||||
|
}
|
||||||
else if (preg_match('/^select;/',$typeofdata))
|
else if (preg_match('/^select;/',$typeofdata))
|
||||||
{
|
{
|
||||||
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
||||||
@ -183,7 +187,7 @@ class Form
|
|||||||
$ret.=$doleditor->Create(1);
|
$ret.=$doleditor->Create(1);
|
||||||
}
|
}
|
||||||
$ret.='</td>';
|
$ret.='</td>';
|
||||||
if ($typeofdata != 'day' && $typeofdata != 'datepicker') $ret.='<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
if ($typeofdata != 'day' && $typeofdata != 'datepicker' && $typeofdata != 'datehourpicker') $ret.='<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
$ret.='</tr></table>'."\n";
|
$ret.='</tr></table>'."\n";
|
||||||
$ret.='</form>'."\n";
|
$ret.='</form>'."\n";
|
||||||
}
|
}
|
||||||
@ -192,6 +196,7 @@ class Form
|
|||||||
if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1);
|
if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1);
|
||||||
elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value);
|
elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value);
|
||||||
elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day');
|
elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day');
|
||||||
|
elseif ($typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour');
|
||||||
else if (preg_match('/^select;/',$typeofdata))
|
else if (preg_match('/^select;/',$typeofdata))
|
||||||
{
|
{
|
||||||
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
||||||
@ -272,7 +277,7 @@ class Form
|
|||||||
if (! empty($tmp[1])) $inputOption=$tmp[1];
|
if (! empty($tmp[1])) $inputOption=$tmp[1];
|
||||||
if (! empty($tmp[2])) $savemethod=$tmp[2];
|
if (! empty($tmp[2])) $savemethod=$tmp[2];
|
||||||
}
|
}
|
||||||
else if (preg_match('/^datepicker/',$inputType))
|
else if ((preg_match('/^datepicker/',$inputType)) || (preg_match('/^datehourpicker/',$inputType)))
|
||||||
{
|
{
|
||||||
$tmp=explode(':',$inputType);
|
$tmp=explode(':',$inputType);
|
||||||
$inputType=$tmp[0];
|
$inputType=$tmp[0];
|
||||||
@ -1447,7 +1452,8 @@ class Form
|
|||||||
|
|
||||||
$num = $this->db->num_rows($result);
|
$num = $this->db->num_rows($result);
|
||||||
|
|
||||||
$outselect.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">';
|
//$outselect.='<select class="flat" id="select'.$htmlname.'" name="'.$htmlname.'">'; // remove select to have id same with combo and ajax
|
||||||
|
$outselect.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||||
if (! $selected) $outselect.='<option value="0" selected="selected"> </option>';
|
if (! $selected) $outselect.='<option value="0" selected="selected"> </option>';
|
||||||
else $outselect.='<option value="0"> </option>';
|
else $outselect.='<option value="0"> </option>';
|
||||||
|
|
||||||
@ -2612,9 +2618,11 @@ class Form
|
|||||||
* @param string $page Page
|
* @param string $page Page
|
||||||
* @param string $selected Date preselected
|
* @param string $selected Date preselected
|
||||||
* @param string $htmlname Name of input html field
|
* @param string $htmlname Name of input html field
|
||||||
|
* @param int $displayhour Display hour selector
|
||||||
|
* @param int $displaymin Display minutes selector
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_date($page, $selected, $htmlname)
|
function form_date($page, $selected, $htmlname,$displayhour=0,$displaymin=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -2625,7 +2633,7 @@ class Form
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $this->select_date($selected,$htmlname,0,0,1,'form'.$htmlname);
|
print $this->select_date($selected,$htmlname,$displayhour,$displaymin,1,'form'.$htmlname);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
print '</tr></table></form>';
|
print '</tr></table></form>';
|
||||||
|
|||||||
@ -143,6 +143,9 @@ class Translate
|
|||||||
* If data for file already loaded, do nothing.
|
* If data for file already loaded, do nothing.
|
||||||
* All data in translation array are stored in UTF-8 format.
|
* All data in translation array are stored in UTF-8 format.
|
||||||
* tab_loaded is completed with $domain key.
|
* tab_loaded is completed with $domain key.
|
||||||
|
* Warning: MAIN_USE_CUSTOM_TRANSLATION is an old deprecated feature. Do not use it. It will revert
|
||||||
|
* rule "we keep first entry found with we keep last entry found" so it is probably not what you want to do.
|
||||||
|
*
|
||||||
* Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache
|
* Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache
|
||||||
*
|
*
|
||||||
* @param string $domain File name to load (.lang file). Must be "file" or "file@module" for module language files:
|
* @param string $domain File name to load (.lang file). Must be "file" or "file@module" for module language files:
|
||||||
@ -198,13 +201,14 @@ class Translate
|
|||||||
// Directory of translation files
|
// Directory of translation files
|
||||||
$file_lang = $searchdir.($modulename?'/'.$modulename:'')."/langs/".$langofdir."/".$newdomain.".lang";
|
$file_lang = $searchdir.($modulename?'/'.$modulename:'')."/langs/".$langofdir."/".$newdomain.".lang";
|
||||||
$file_lang_osencoded=dol_osencode($file_lang);
|
$file_lang_osencoded=dol_osencode($file_lang);
|
||||||
|
|
||||||
$filelangexists=is_file($file_lang_osencoded);
|
$filelangexists=is_file($file_lang_osencoded);
|
||||||
|
|
||||||
//dol_syslog('Translate::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
|
//dol_syslog('Translate::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
|
||||||
|
|
||||||
if ($filelangexists)
|
if ($filelangexists)
|
||||||
{
|
{
|
||||||
// TODO Move cache read out of loop on dirs
|
// TODO Move cache read out of loop on dirs or at least filelangexists
|
||||||
$found=false;
|
$found=false;
|
||||||
|
|
||||||
// Enable caching of lang file in memory (not by default)
|
// Enable caching of lang file in memory (not by default)
|
||||||
|
|||||||
@ -49,8 +49,13 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
|
|
||||||
// Remove product id before select another product
|
// Remove product id before select another product
|
||||||
// use keyup instead change to avoid loosing the product id
|
// use keyup instead change to avoid loosing the product id
|
||||||
$("input#search_'.$htmlname.'").keyup(function() {
|
$("input#search_'.$htmlname.'").keydown(function() {
|
||||||
$("#'.$htmlname.'").val("").trigger("change");
|
//console.log(\'purge_id_after_keydown\');
|
||||||
|
$("#'.$htmlname.'").val("");
|
||||||
|
});
|
||||||
|
$("input#search_'.$htmlname.'").change(function() {
|
||||||
|
//console.log(\'keyup\');
|
||||||
|
$("#'.$htmlname.'").trigger("change");
|
||||||
});
|
});
|
||||||
// Check when keyup
|
// Check when keyup
|
||||||
$("input#search_'.$htmlname.'").onDelayedKeyup({ handler: function() {
|
$("input#search_'.$htmlname.'").onDelayedKeyup({ handler: function() {
|
||||||
@ -116,6 +121,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
minLength: '.$minLength.',
|
minLength: '.$minLength.',
|
||||||
select: function( event, ui ) {
|
select: function( event, ui ) {
|
||||||
|
//console.log(\'set value of id with \'+ui.item.id);
|
||||||
$("#'.$htmlname.'").val(ui.item.id).trigger("change");
|
$("#'.$htmlname.'").val(ui.item.id).trigger("change");
|
||||||
// Disable an element
|
// Disable an element
|
||||||
if (options.option_disabled) {
|
if (options.option_disabled) {
|
||||||
|
|||||||
@ -2703,9 +2703,8 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
|||||||
// Some test to guess with no need to make database access
|
// Some test to guess with no need to make database access
|
||||||
if ($mysoc->country_code == 'ES') // For spain, localtaxes are qualified if both supplier and seller use local taxe
|
if ($mysoc->country_code == 'ES') // For spain, localtaxes are qualified if both supplier and seller use local taxe
|
||||||
{
|
{
|
||||||
if ($local == 1 && (! $thirdparty_seller->localtax1_assuj || ! $thirdparty_buyer->localtax1_assuj)) return 0;
|
if ($local == 1 && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
if ($local == 2 && (! $thirdparty_seller->localtax2_assuj || ! $thirdparty_buyer->localtax2_assuj)) return 0;
|
if ($local == 2 && ! $thirdparty_seller->localtax2_assuj) return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2995,18 +2994,27 @@ function get_default_npr($thirdparty_seller, $thirdparty_buyer, $idprod)
|
|||||||
*/
|
*/
|
||||||
function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0)
|
function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod=0)
|
||||||
{
|
{
|
||||||
|
global $mysoc;
|
||||||
|
|
||||||
if (!is_object($thirdparty_seller)) return -1;
|
if (!is_object($thirdparty_seller)) return -1;
|
||||||
if (!is_object($thirdparty_buyer)) return -1;
|
if (!is_object($thirdparty_buyer)) return -1;
|
||||||
|
|
||||||
if ($local==1) //RE
|
if ($local==1) // Localtax 1
|
||||||
{
|
{
|
||||||
// Si vendeur non assujeti a RE, localtax1 par default=0
|
if ($mysoc->country_code == 'ES')
|
||||||
if (is_numeric($thirdparty_seller->localtax1_assuj) && ! $thirdparty_seller->localtax1_assuj) return 0;
|
{
|
||||||
if (! is_numeric($thirdparty_seller->localtax1_assuj) && $thirdparty_seller->localtax1_assuj=='localtax1off') return 0;
|
if (is_numeric($thirdparty_buyer->localtax1_assuj) && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Si vendeur non assujeti a Localtax1, localtax1 par default=0
|
||||||
|
if (is_numeric($thirdparty_seller->localtax1_assuj) && ! $thirdparty_seller->localtax1_assuj) return 0;
|
||||||
|
if (! is_numeric($thirdparty_seller->localtax1_assuj) && $thirdparty_seller->localtax1_assuj=='localtax1off') return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($local==2) //IRPF
|
elseif ($local==2) //I Localtax 2
|
||||||
{
|
{
|
||||||
// Si vendeur non assujeti a IRPF, localtax2 par default=0
|
// Si vendeur non assujeti a Localtax2, localtax2 par default=0
|
||||||
if (is_numeric($thirdparty_seller->localtax2_assuj) && ! $thirdparty_seller->localtax2_assuj) return 0;
|
if (is_numeric($thirdparty_seller->localtax2_assuj) && ! $thirdparty_seller->localtax2_assuj) return 0;
|
||||||
if (! is_numeric($thirdparty_seller->localtax2_assuj) && $thirdparty_seller->localtax2_assuj=='localtax2off') return 0;
|
if (! is_numeric($thirdparty_seller->localtax2_assuj) && $thirdparty_seller->localtax2_assuj=='localtax2off') return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
/* Copyright (C) 2010-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -42,14 +42,13 @@
|
|||||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
?>
|
?>
|
||||||
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
<td align="right"><?php echo $langs->trans('BuyingPrice'); ?></td>
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
|
||||||
$colspan++;
|
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
|
||||||
$colspan++;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||||
@ -63,7 +62,7 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
jQuery('#idprod').change(function() {
|
jQuery('#idprod').change(function() {
|
||||||
jQuery('#np_desc').focus();
|
if (jQuery('#idprod').val() > 0) jQuery('#np_desc').focus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -97,17 +96,16 @@ jQuery(document).ready(function() {
|
|||||||
<td align="right" nowrap><input type="text" size="1" name="remise_percent" value="<?php echo $buyer->remise_client; ?>">%</td>
|
<td align="right" nowrap><input type="text" size="1" name="remise_percent" value="<?php echo $buyer->remise_client; ?>">%</td>
|
||||||
<?php
|
<?php
|
||||||
$colspan = 4;
|
$colspan = 4;
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
?>
|
?>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
<select id="fournprice" name="fournprice" style="display: none;"></select>
|
<select id="fournprice" name="fournprice" style="display: none;"></select>
|
||||||
<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
<input type="text" size="5" id="buying_price" name="buying_price" value="<?php echo (isset($_POST["buying_price"])?$_POST["buying_price"]:''); ?>">
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
|
||||||
$colspan++;
|
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
|
||||||
$colspan++;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>">
|
<td align="center" valign="middle" colspan="<?php echo $colspan; ?>">
|
||||||
@ -115,18 +113,17 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if (! empty($conf->service->enabled) && $dateSelector) {
|
<?php
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
if (! empty($conf->service->enabled) && $dateSelector)
|
||||||
$colspan = 10;
|
{
|
||||||
else
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||||
$colspan = 9;
|
else $colspan = 9;
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled))
|
||||||
$colspan++; // For the buying price
|
{
|
||||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
$colspan++; // For the buying price
|
||||||
$colspan++;
|
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||||
$colspan++;
|
}
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<tr <?php echo $bcnd[$var]; ?>>
|
<tr <?php echo $bcnd[$var]; ?>>
|
||||||
<td colspan="<?php echo $colspan; ?>">
|
<td colspan="<?php echo $colspan; ?>">
|
||||||
@ -138,11 +135,15 @@ if (! empty($conf->margin->enabled)) {
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled))
|
||||||
|
{
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#idprod").change(function() {
|
$("#idprod").change(function() {
|
||||||
@ -177,5 +178,7 @@ $("#idprod").change(function() {
|
|||||||
'json');
|
'json');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
<!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
||||||
|
|||||||
@ -954,34 +954,67 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
{
|
{
|
||||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur");
|
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur");
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
|
if ($this->id) {
|
||||||
$sql.= " SET ref='(PROV".$this->id.")'";
|
$num=count($this->lines);
|
||||||
$sql.= " WHERE rowid=".$this->id;
|
|
||||||
dol_syslog(get_class($this)."::create sql=".$sql);
|
|
||||||
if ($this->db->query($sql))
|
|
||||||
{
|
|
||||||
// On logue creation pour historique
|
|
||||||
$this->log($user, 0, time());
|
|
||||||
|
|
||||||
if (! $notrigger)
|
/*
|
||||||
{
|
* Insertion du detail des produits dans la base
|
||||||
// Appel des triggers
|
*/
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
for ($i=0;$i<$num;$i++)
|
||||||
$interface=new Interfaces($this->db);
|
{
|
||||||
$result=$interface->run_triggers('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf);
|
$result = $this->addline(
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
$this->lines[$i]->desc,
|
||||||
// Fin appel triggers
|
$this->lines[$i]->subprice,
|
||||||
}
|
$this->lines[$i]->qty,
|
||||||
|
$this->lines[$i]->tva_tx,
|
||||||
|
$this->lines[$i]->localtax1_tx,
|
||||||
|
$this->lines[$i]->localtax2_tx,
|
||||||
|
$this->lines[$i]->fk_product,
|
||||||
|
0,
|
||||||
|
$this->lines[$i]->ref_fourn,
|
||||||
|
$this->lines[$i]->remise_percent,
|
||||||
|
'HT',
|
||||||
|
0,
|
||||||
|
$this->lines[$i]->info_bits
|
||||||
|
);
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
|
dol_print_error($this->db);
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
|
||||||
return $this->id;
|
$sql.= " SET ref='(PROV".$this->id.")'";
|
||||||
}
|
$sql.= " WHERE rowid=".$this->id;
|
||||||
else
|
dol_syslog(get_class($this)."::create sql=".$sql);
|
||||||
{
|
if ($this->db->query($sql))
|
||||||
$this->error=$this->db->error();
|
{
|
||||||
dol_syslog(get_class($this)."::create: Failed -2 - ".$this->error, LOG_ERR);
|
// On logue creation pour historique
|
||||||
$this->db->rollback();
|
$this->log($user, 0, time());
|
||||||
return -2;
|
|
||||||
|
if (! $notrigger)
|
||||||
|
{
|
||||||
|
// Appel des triggers
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
|
$result=$interface->run_triggers('ORDER_SUPPLIER_CREATE',$this,$user,$langs,$conf);
|
||||||
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
|
// Fin appel triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->db->commit();
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->error=$this->db->error();
|
||||||
|
dol_syslog(get_class($this)."::create: Failed -2 - ".$this->error, LOG_ERR);
|
||||||
|
$this->db->rollback();
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -993,6 +1026,69 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load an object from its id and create a new one in database
|
||||||
|
*
|
||||||
|
* @param HookManager $hookmanager Hook manager instance
|
||||||
|
* @return int New id of clone
|
||||||
|
*/
|
||||||
|
function createFromClone($hookmanager=false)
|
||||||
|
{
|
||||||
|
global $conf,$user,$langs;
|
||||||
|
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
|
// Load source object
|
||||||
|
$objFrom = dol_clone($this);
|
||||||
|
|
||||||
|
$this->id=0;
|
||||||
|
$this->statut=0;
|
||||||
|
|
||||||
|
// Clear fields
|
||||||
|
$this->user_author_id = $user->id;
|
||||||
|
$this->user_valid = '';
|
||||||
|
$this->date_creation = '';
|
||||||
|
$this->date_validation = '';
|
||||||
|
$this->ref_supplier = '';
|
||||||
|
|
||||||
|
// Create clone
|
||||||
|
$result=$this->create($user);
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
// Hook of thirdparty module
|
||||||
|
if (is_object($hookmanager))
|
||||||
|
{
|
||||||
|
$parameters=array('objFrom'=>$objFrom);
|
||||||
|
$action='';
|
||||||
|
$reshook=$hookmanager->executeHooks('createFrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Appel des triggers
|
||||||
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
|
$result=$interface->run_triggers('ORDER_SUPPLIER_CLONE',$this,$user,$langs,$conf);
|
||||||
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
|
// Fin appel triggers
|
||||||
|
}
|
||||||
|
|
||||||
|
// End
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$this->db->commit();
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add order line
|
* Add order line
|
||||||
*
|
*
|
||||||
@ -1044,7 +1140,6 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
$desc=trim($desc);
|
$desc=trim($desc);
|
||||||
|
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if ($qty < 1 && ! $fk_product)
|
if ($qty < 1 && ! $fk_product)
|
||||||
{
|
{
|
||||||
@ -1053,7 +1148,6 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
}
|
}
|
||||||
if ($type < 0) return -1;
|
if ($type < 0) return -1;
|
||||||
|
|
||||||
|
|
||||||
if ($this->statut == 0)
|
if ($this->statut == 0)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|||||||
@ -78,13 +78,18 @@ $errors=array();
|
|||||||
|
|
||||||
$object = new CommandeFournisseur($db);
|
$object = new CommandeFournisseur($db);
|
||||||
|
|
||||||
|
// Load object
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
|
{
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
$object->fetch_thirdparty();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||||
if ($result < 0) dol_print_error($db, $object->error);
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
}
|
}
|
||||||
@ -92,14 +97,12 @@ if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
|||||||
// conditions de reglement
|
// conditions de reglement
|
||||||
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer)
|
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// mode de reglement
|
// mode de reglement
|
||||||
else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,13 +122,11 @@ if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->cree
|
|||||||
// Set project
|
// Set project
|
||||||
else if ($action == 'classin' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'classin' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->setProject($projectid);
|
$object->setProject($projectid);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->set_remise($user, $_POST['remise_percent']);
|
$result = $object->set_remise($user, $_POST['remise_percent']);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +382,6 @@ else if ($action == 'updateligne' && $user->rights->fournisseur->commande->creer
|
|||||||
|
|
||||||
else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
$result = $object->deleteline(GETPOST('lineid'));
|
$result = $object->deleteline(GETPOST('lineid'));
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
@ -413,7 +413,6 @@ else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->r
|
|||||||
|
|
||||||
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fournisseur->commande->valider)
|
else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fournisseur->commande->valider)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$object->date_commande=dol_now();
|
$object->date_commande=dol_now();
|
||||||
@ -448,7 +447,6 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou
|
|||||||
{
|
{
|
||||||
$idwarehouse=GETPOST('idwarehouse', 'int');
|
$idwarehouse=GETPOST('idwarehouse', 'int');
|
||||||
|
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
@ -479,7 +477,6 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou
|
|||||||
|
|
||||||
else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver)
|
else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->refuse($user);
|
$result = $object->refuse($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -494,7 +491,6 @@ else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->four
|
|||||||
|
|
||||||
else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']);
|
$result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -510,7 +506,6 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo
|
|||||||
|
|
||||||
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer)
|
else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
$result=$object->delete($user);
|
$result=$object->delete($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
@ -524,10 +519,35 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->four
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Action clone object
|
||||||
|
else if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer)
|
||||||
|
{
|
||||||
|
if (1==0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers'))
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("NoCloneOptionsSpecified").'</div>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($object->id > 0)
|
||||||
|
{
|
||||||
|
$result=$object->createFromClone($hookmanager);
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$object->error.'</div>';
|
||||||
|
$action='';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Receive
|
// Receive
|
||||||
else if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner)
|
else if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
if ($_POST["type"])
|
if ($_POST["type"])
|
||||||
{
|
{
|
||||||
@ -557,7 +577,6 @@ else if ($action == 'livraison' && $user->rights->fournisseur->commande->recepti
|
|||||||
|
|
||||||
else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$result = $object->cancel($user);
|
$result = $object->cancel($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -573,7 +592,6 @@ else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->four
|
|||||||
// Line ordering
|
// Line ordering
|
||||||
else if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->line_up($_GET['rowid']);
|
$object->line_up($_GET['rowid']);
|
||||||
|
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -588,7 +606,6 @@ else if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
|||||||
}
|
}
|
||||||
else if ($action == 'down' && $user->rights->fournisseur->commande->creer)
|
else if ($action == 'down' && $user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
|
||||||
$object->line_down($_GET['rowid']);
|
$object->line_down($_GET['rowid']);
|
||||||
|
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
@ -607,7 +624,6 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) /
|
|||||||
// Build document
|
// Build document
|
||||||
|
|
||||||
// Sauvegarde le dernier module choisi pour generer un document
|
// Sauvegarde le dernier module choisi pour generer un document
|
||||||
$object->fetch($id);
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
if ($_REQUEST['model'])
|
if ($_REQUEST['model'])
|
||||||
@ -985,6 +1001,18 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone confirmation
|
||||||
|
if ($action == 'clone')
|
||||||
|
{
|
||||||
|
// Create an array for form
|
||||||
|
$formquestion=array(
|
||||||
|
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1)
|
||||||
|
);
|
||||||
|
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||||
|
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$object->ref),'confirm_clone',$formquestion,'yes',1);
|
||||||
|
if ($ret == 'html') print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la validation
|
* Confirmation de la validation
|
||||||
*/
|
*/
|
||||||
@ -1037,6 +1065,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1);
|
$ret=$form->form_confirm("fiche.php?id=$object->id",$langs->trans("DenyingThisOrder"),$langs->trans("ConfirmDenyingThisOrder",$object->ref),"confirm_refuse", '', 0, 1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de l'annulation
|
* Confirmation de l'annulation
|
||||||
*/
|
*/
|
||||||
@ -1461,12 +1490,22 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td colspan="4"> </td>';
|
print '<td colspan="4"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// TODO Use the predefinedproductline_create.tpl.php file
|
||||||
|
|
||||||
// Add free products/services form
|
// Add free products/services form
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#add" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'#add" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="addline">';
|
print '<input type="hidden" name="action" value="addline">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
|
print '<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery(\'#idprodfournprice\').change(function() {
|
||||||
|
if (jQuery(\'#idprodfournprice\').val() > 0) jQuery(\'#np_desc\').focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -1646,6 +1685,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clone
|
||||||
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=order">'.$langs->trans("ToClone").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($user->rights->fournisseur->commande->supprimer)
|
if ($user->rights->fournisseur->commande->supprimer)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -82,7 +82,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
|
|||||||
$result=$object->createFromClone($id);
|
$result=$object->createFromClone($id);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
header("Location: ".$_SERVER['PHP_SELF'].'?action=editfacnumber&id='.$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -466,10 +466,19 @@ elseif ($action == 'addline')
|
|||||||
}
|
}
|
||||||
$ret=$object->fetch_thirdparty();
|
$ret=$object->fetch_thirdparty();
|
||||||
|
|
||||||
if ($_POST['idprodfournprice']) // > 0 or -1
|
if (GETPOST('search_idprodfournprice') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1, with autocomplete, idprodfournprice is > 0 or ''
|
||||||
{
|
{
|
||||||
$product=new Product($db);
|
$idprod=0;
|
||||||
$idprod=$product->get_buyprice($_POST['idprodfournprice'], $_POST['qty']); // Just to see if a price exists for the quantity. Not used to found vat
|
$product=new Product($db);
|
||||||
|
|
||||||
|
if (GETPOST('idprodfournprice') == '')
|
||||||
|
{
|
||||||
|
$idprod=-1;
|
||||||
|
}
|
||||||
|
if (GETPOST('idprodfournprice') > 0)
|
||||||
|
{
|
||||||
|
$idprod=$product->get_buyprice(GETPOST('idprodfournprice'), $_POST['qty']); // Just to see if a price exists for the quantity. Not used to found vat
|
||||||
|
}
|
||||||
|
|
||||||
if ($idprod > 0)
|
if ($idprod > 0)
|
||||||
{
|
{
|
||||||
@ -1805,10 +1814,20 @@ else
|
|||||||
print '<td colspan="4"> </td>';
|
print '<td colspan="4"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// TODO Use the predefinedproductline_create.tpl.php file
|
||||||
print '<form name="addline_predef" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addline" method="post">';
|
print '<form name="addline_predef" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addline" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="socid" value="'. $object->socid .'">';
|
print '<input type="hidden" name="socid" value="'. $object->socid .'">';
|
||||||
print '<input type="hidden" name="facid" value="'.$object->id.'">';
|
print '<input type="hidden" name="facid" value="'.$object->id.'">';
|
||||||
|
|
||||||
|
print '<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery(\'#idprodfournprice\').change(function() {
|
||||||
|
if (jQuery(\'#idprodfournprice\').val() > 0) jQuery(\'#np_desc\').focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>';
|
||||||
|
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td colspan="4">';
|
print '<td colspan="4">';
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Supplier=المورد
|
|||||||
AddSupplier=إضافة مورد
|
AddSupplier=إضافة مورد
|
||||||
SupplierRemoved=إزالة المورد
|
SupplierRemoved=إزالة المورد
|
||||||
SuppliersInvoice=فاتورة الموردين
|
SuppliersInvoice=فاتورة الموردين
|
||||||
SuppliersInvoices=فواتير الموردين
|
|
||||||
NewSupplier=مورد جديد
|
NewSupplier=مورد جديد
|
||||||
History=التاريخ
|
History=التاريخ
|
||||||
ListOfSuppliers=قائمة الموردين
|
ListOfSuppliers=قائمة الموردين
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=Снабдител
|
|||||||
AddSupplier=Добави доставчик
|
AddSupplier=Добави доставчик
|
||||||
SupplierRemoved=Изтрити доставчик
|
SupplierRemoved=Изтрити доставчик
|
||||||
SuppliersInvoice=Фактура
|
SuppliersInvoice=Фактура
|
||||||
SuppliersInvoices=Фактури
|
|
||||||
NewSupplier=Нов доставчик
|
NewSupplier=Нов доставчик
|
||||||
History=Исторически
|
History=Исторически
|
||||||
ListOfSuppliers=Списък на доставчиците
|
ListOfSuppliers=Списък на доставчиците
|
||||||
|
|||||||
@ -47,7 +47,7 @@ InvoiceCustomer=Factura a client
|
|||||||
CustomerInvoice=Factura a client
|
CustomerInvoice=Factura a client
|
||||||
CustomersInvoices=Factures a clientes
|
CustomersInvoices=Factures a clientes
|
||||||
SupplierInvoice=Factura de proveïdor
|
SupplierInvoice=Factura de proveïdor
|
||||||
SuppliersInvoices=Factures de proveïdors
|
SuppliersInvoices=Factures proveïdors
|
||||||
SupplierBill=Factura de proveïdor
|
SupplierBill=Factura de proveïdor
|
||||||
SupplierBills=Factures de proveïdors
|
SupplierBills=Factures de proveïdors
|
||||||
Payment=Pagament
|
Payment=Pagament
|
||||||
|
|||||||
@ -12,6 +12,7 @@ Language_en_AU=Anglès (Australia)
|
|||||||
Language_en_GB=Anglès (Regne Unit)
|
Language_en_GB=Anglès (Regne Unit)
|
||||||
Language_en_IN=Anglès (Índia)
|
Language_en_IN=Anglès (Índia)
|
||||||
Language_en_NZ=Anglais (Nova Zelanda)
|
Language_en_NZ=Anglais (Nova Zelanda)
|
||||||
|
Language_en_SA=Inglés (Aràbia Saudita)
|
||||||
Language_en_US=Anglès (Estats Units)
|
Language_en_US=Anglès (Estats Units)
|
||||||
Language_es_ES=Espanyol
|
Language_es_ES=Espanyol
|
||||||
Language_es_AR=Espanyol (Argentina)
|
Language_es_AR=Espanyol (Argentina)
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Proveïdor
|
|||||||
AddSupplier=Afegir proveïdor
|
AddSupplier=Afegir proveïdor
|
||||||
SupplierRemoved=Proveïdor eliminat
|
SupplierRemoved=Proveïdor eliminat
|
||||||
SuppliersInvoice=Factura proveïdor
|
SuppliersInvoice=Factura proveïdor
|
||||||
SuppliersInvoices=Factures proveïdors
|
|
||||||
NewSupplier=Nou proveïdor
|
NewSupplier=Nou proveïdor
|
||||||
History=Històric
|
History=Històric
|
||||||
ListOfSuppliers=Llistat de proveïdors
|
ListOfSuppliers=Llistat de proveïdors
|
||||||
|
|||||||
@ -16,7 +16,6 @@ Supplier=Leverandør
|
|||||||
AddSupplier=Tilføj en leverandør
|
AddSupplier=Tilføj en leverandør
|
||||||
SupplierRemoved=Leverandør fjernet
|
SupplierRemoved=Leverandør fjernet
|
||||||
SuppliersInvoice=Leverandører faktura
|
SuppliersInvoice=Leverandører faktura
|
||||||
SuppliersInvoices=Leverandører fakturaer
|
|
||||||
NewSupplier=Ny leverandør
|
NewSupplier=Ny leverandør
|
||||||
History=Historie
|
History=Historie
|
||||||
ListOfSuppliers=Liste over leverandører
|
ListOfSuppliers=Liste over leverandører
|
||||||
|
|||||||
@ -12,7 +12,6 @@ Supplier=Lieferant
|
|||||||
AddSupplier=Lieferanten hinzufügen
|
AddSupplier=Lieferanten hinzufügen
|
||||||
SupplierRemoved=Lieferant entfernt
|
SupplierRemoved=Lieferant entfernt
|
||||||
SuppliersInvoice=Lieferantenrechnung
|
SuppliersInvoice=Lieferantenrechnung
|
||||||
SuppliersInvoices=Lieferantenrechnungen
|
|
||||||
NewSupplier=Neuer Lieferant
|
NewSupplier=Neuer Lieferant
|
||||||
History=Verlauf
|
History=Verlauf
|
||||||
ListOfSuppliers=Lieferantenliste
|
ListOfSuppliers=Lieferantenliste
|
||||||
|
|||||||
@ -12,7 +12,6 @@ Supplier=Lieferant
|
|||||||
AddSupplier=Lieferanten hinzufügen
|
AddSupplier=Lieferanten hinzufügen
|
||||||
SupplierRemoved=Lieferant entfernt
|
SupplierRemoved=Lieferant entfernt
|
||||||
SuppliersInvoice=Lieferantenrechnung
|
SuppliersInvoice=Lieferantenrechnung
|
||||||
SuppliersInvoices=Lieferantenrechnungen
|
|
||||||
NewSupplier=Neuer Lieferant
|
NewSupplier=Neuer Lieferant
|
||||||
History=Verlauf
|
History=Verlauf
|
||||||
ListOfSuppliers=Lieferantenliste
|
ListOfSuppliers=Lieferantenliste
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Προμηθευτής
|
|||||||
AddSupplier=Προσθήκη προμηθευτή
|
AddSupplier=Προσθήκη προμηθευτή
|
||||||
SupplierRemoved=Ο προμηθευτής αφαιρέθηκε
|
SupplierRemoved=Ο προμηθευτής αφαιρέθηκε
|
||||||
SuppliersInvoice=Τιμολόγιο προμηθευτή
|
SuppliersInvoice=Τιμολόγιο προμηθευτή
|
||||||
SuppliersInvoices=Τιμολόγια προμηθευτών
|
|
||||||
NewSupplier=Νέος προμηθευτής
|
NewSupplier=Νέος προμηθευτής
|
||||||
History=Ιστορικό
|
History=Ιστορικό
|
||||||
ListOfSuppliers=Λίστα προμηθευτών
|
ListOfSuppliers=Λίστα προμηθευτών
|
||||||
|
|||||||
17
htdocs/langs/en_SA/main.lang
Normal file
17
htdocs/langs/en_SA/main.lang
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Dolibarr language file - en_SA - main
|
||||||
|
CHARSET=UTF-8
|
||||||
|
DIRECTION=ltr
|
||||||
|
FONTFORPDF=DejaVuSans
|
||||||
|
FONTSIZEFORPDF=9
|
||||||
|
SeparatorDecimal=.
|
||||||
|
SeparatorThousand=,
|
||||||
|
FormatDateShort=%d/%m/%Y
|
||||||
|
FormatDateShortJava=dd/MM/yyyy
|
||||||
|
FormatDateShortJQuery=dd/mm/yy
|
||||||
|
FormatHourShort=%I:%M %p
|
||||||
|
FormatHourShortDuration=%H:%M
|
||||||
|
FormatDateTextShort=%d %b %Y
|
||||||
|
FormatDateText=%d %B %Y
|
||||||
|
FormatDateHourShort=%d/%m/%Y %I:%M %p
|
||||||
|
FormatDateHourTextShort=%d %b %Y, %I:%M %p
|
||||||
|
FormatDateHourText=%d %B %Y, %I:%M %p
|
||||||
8
htdocs/langs/en_SA/propal.lang
Normal file
8
htdocs/langs/en_SA/propal.lang
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Dolibarr language file - en_SA - propal
|
||||||
|
CHARSET=UTF-8
|
||||||
|
Proposals=Commercial Proposals
|
||||||
|
Proposal=Commercial Proposal
|
||||||
|
Prop=Commercial Proposals
|
||||||
|
CommercialProposal=Commercial Proposal
|
||||||
|
CommercialProposals=Commercial Proposals
|
||||||
|
DateEndPropal=Validity Ending Date
|
||||||
@ -49,9 +49,9 @@ Invoices=Invoices
|
|||||||
InvoiceLine=Invoice line
|
InvoiceLine=Invoice line
|
||||||
InvoiceCustomer=Customer invoice
|
InvoiceCustomer=Customer invoice
|
||||||
CustomerInvoice=Customer invoice
|
CustomerInvoice=Customer invoice
|
||||||
CustomersInvoices=Customer's invoices
|
CustomersInvoices=Customers invoices
|
||||||
SupplierInvoice=Supplier invoice
|
SupplierInvoice=Supplier invoice
|
||||||
SuppliersInvoices=Supplier's invoices
|
SuppliersInvoices=Suppliers invoices
|
||||||
SupplierBill=Supplier invoice
|
SupplierBill=Supplier invoice
|
||||||
SupplierBills=suppliers invoices
|
SupplierBills=suppliers invoices
|
||||||
Payment=Payment
|
Payment=Payment
|
||||||
|
|||||||
@ -14,6 +14,7 @@ Language_en_AU=English (Australia)
|
|||||||
Language_en_GB=English (United Kingdom)
|
Language_en_GB=English (United Kingdom)
|
||||||
Language_en_IN=English (India)
|
Language_en_IN=English (India)
|
||||||
Language_en_NZ=English (New Zealand)
|
Language_en_NZ=English (New Zealand)
|
||||||
|
Language_en_SA=English (Saudi Arabia)
|
||||||
Language_en_US=English (United States)
|
Language_en_US=English (United States)
|
||||||
Language_es_ES=Spanish
|
Language_es_ES=Spanish
|
||||||
Language_es_AR=Spanish (Argentina)
|
Language_es_AR=Spanish (Argentina)
|
||||||
|
|||||||
@ -61,7 +61,7 @@ FileUploaded=The file was successfully uploaded
|
|||||||
AssociatedDocuments=Documents associated with the proposal:
|
AssociatedDocuments=Documents associated with the proposal:
|
||||||
ErrorCantOpenDir=Can't open directory
|
ErrorCantOpenDir=Can't open directory
|
||||||
DatePropal=Date of proposal
|
DatePropal=Date of proposal
|
||||||
DateEndPropal=Date end validity
|
DateEndPropal=Validity ending date
|
||||||
DateEndPropalShort=Date end
|
DateEndPropalShort=Date end
|
||||||
ValidityDuration=Validity duration
|
ValidityDuration=Validity duration
|
||||||
CloseAs=Close with status
|
CloseAs=Close with status
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Supplier
|
|||||||
AddSupplier=Add a supplier
|
AddSupplier=Add a supplier
|
||||||
SupplierRemoved=Supplier removed
|
SupplierRemoved=Supplier removed
|
||||||
SuppliersInvoice=Suppliers invoice
|
SuppliersInvoice=Suppliers invoice
|
||||||
SuppliersInvoices=Suppliers invoices
|
|
||||||
NewSupplier=New supplier
|
NewSupplier=New supplier
|
||||||
History=History
|
History=History
|
||||||
ListOfSuppliers=List of suppliers
|
ListOfSuppliers=List of suppliers
|
||||||
|
|||||||
@ -47,7 +47,7 @@ InvoiceCustomer=Factura a cliente
|
|||||||
CustomerInvoice=Factura a cliente
|
CustomerInvoice=Factura a cliente
|
||||||
CustomersInvoices=Facturas a clientes
|
CustomersInvoices=Facturas a clientes
|
||||||
SupplierInvoice=Factura de proveedor
|
SupplierInvoice=Factura de proveedor
|
||||||
SuppliersInvoices=Facturas de proveedores
|
SuppliersInvoices=Facturas proveedores
|
||||||
SupplierBill=Factura de proveedor
|
SupplierBill=Factura de proveedor
|
||||||
SupplierBills=Facturas de proveedores
|
SupplierBills=Facturas de proveedores
|
||||||
Payment=Pago
|
Payment=Pago
|
||||||
|
|||||||
@ -14,6 +14,7 @@ Language_en_AU=Inglés (Australia)
|
|||||||
Language_en_GB=Inglés (Reino Unido)
|
Language_en_GB=Inglés (Reino Unido)
|
||||||
Language_en_IN=Inglés (India)
|
Language_en_IN=Inglés (India)
|
||||||
Language_en_NZ=Inglés (Nueva Zelanda)
|
Language_en_NZ=Inglés (Nueva Zelanda)
|
||||||
|
Language_en_SA=Inglés (Arabia Saudita)
|
||||||
Language_en_US=Inglés (Estados Unidos)
|
Language_en_US=Inglés (Estados Unidos)
|
||||||
Language_es_ES=Español
|
Language_es_ES=Español
|
||||||
Language_es_AR=Español (Argentina)
|
Language_es_AR=Español (Argentina)
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Proveedor
|
|||||||
AddSupplier=Añadir proveedor
|
AddSupplier=Añadir proveedor
|
||||||
SupplierRemoved=Proveedor eliminado
|
SupplierRemoved=Proveedor eliminado
|
||||||
SuppliersInvoice=Factura proveedor
|
SuppliersInvoice=Factura proveedor
|
||||||
SuppliersInvoices=Facturas proveedores
|
|
||||||
NewSupplier=Nuevo proveedor
|
NewSupplier=Nuevo proveedor
|
||||||
History=Histórico
|
History=Histórico
|
||||||
ListOfSuppliers=Listado de proveedores
|
ListOfSuppliers=Listado de proveedores
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=Tarnija
|
|||||||
AddSupplier=Lisa tarnija
|
AddSupplier=Lisa tarnija
|
||||||
SupplierRemoved=Tarnija välja
|
SupplierRemoved=Tarnija välja
|
||||||
SuppliersInvoice=Tarnijate arve
|
SuppliersInvoice=Tarnijate arve
|
||||||
SuppliersInvoices=Tarnijate arvete
|
|
||||||
NewSupplier=New tarnija
|
NewSupplier=New tarnija
|
||||||
History=Ajalugu
|
History=Ajalugu
|
||||||
ListOfSuppliers=Tarnijate
|
ListOfSuppliers=Tarnijate
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Supplier=المورد
|
|||||||
AddSupplier=إضافة مورد
|
AddSupplier=إضافة مورد
|
||||||
SupplierRemoved=إزالة المورد
|
SupplierRemoved=إزالة المورد
|
||||||
SuppliersInvoice=فاتورة الموردين
|
SuppliersInvoice=فاتورة الموردين
|
||||||
SuppliersInvoices=فواتير الموردين
|
|
||||||
NewSupplier=مورد جديد
|
NewSupplier=مورد جديد
|
||||||
History=التاريخ
|
History=التاريخ
|
||||||
ListOfSuppliers=قائمة الموردين
|
ListOfSuppliers=قائمة الموردين
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Supplier=Toimittaja
|
|||||||
AddSupplier=Lisää toimittaja
|
AddSupplier=Lisää toimittaja
|
||||||
SupplierRemoved=Toimittaja poistettu
|
SupplierRemoved=Toimittaja poistettu
|
||||||
SuppliersInvoice=Tavarantoimittajat lasku
|
SuppliersInvoice=Tavarantoimittajat lasku
|
||||||
SuppliersInvoices=Tavarantoimittajat laskut
|
|
||||||
NewSupplier=Uuden toimittajan
|
NewSupplier=Uuden toimittajan
|
||||||
History=Historia
|
History=Historia
|
||||||
ListOfSuppliers=Luettelo toimittajat
|
ListOfSuppliers=Luettelo toimittajat
|
||||||
|
|||||||
@ -47,7 +47,6 @@ InvoiceCustomer=Facture client
|
|||||||
CustomerInvoice=Facture client
|
CustomerInvoice=Facture client
|
||||||
CustomersInvoices=Factures clients
|
CustomersInvoices=Factures clients
|
||||||
SupplierInvoice=Facture fournisseur
|
SupplierInvoice=Facture fournisseur
|
||||||
SuppliersInvoices=Factures fournisseurs
|
|
||||||
SupplierBill=Facture fournisseur
|
SupplierBill=Facture fournisseur
|
||||||
SupplierBills=Factures fournisseurs
|
SupplierBills=Factures fournisseurs
|
||||||
Payment=Règlement
|
Payment=Règlement
|
||||||
|
|||||||
@ -14,6 +14,7 @@ Language_en_AU=Anglais (Australie)
|
|||||||
Language_en_GB=Anglais (Royaume-Uni)
|
Language_en_GB=Anglais (Royaume-Uni)
|
||||||
Language_en_IN=Anglais (Inde)
|
Language_en_IN=Anglais (Inde)
|
||||||
Language_en_NZ=Anglais (Nouvelle Zeland)
|
Language_en_NZ=Anglais (Nouvelle Zeland)
|
||||||
|
Language_en_SA=Anglais (Arabie Saoudite)
|
||||||
Language_en_US=Anglais (Etats-Unis)
|
Language_en_US=Anglais (Etats-Unis)
|
||||||
Language_es_ES=Espagnol
|
Language_es_ES=Espagnol
|
||||||
Language_es_AR=Espagnol (Argentine)
|
Language_es_AR=Espagnol (Argentine)
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Fournisseur
|
|||||||
AddSupplier=Ajouter un fournisseur
|
AddSupplier=Ajouter un fournisseur
|
||||||
SupplierRemoved=Fournisseur supprimé
|
SupplierRemoved=Fournisseur supprimé
|
||||||
SuppliersInvoice=Facture fournisseur
|
SuppliersInvoice=Facture fournisseur
|
||||||
SuppliersInvoices=Factures fournisseurs
|
|
||||||
NewSupplier=Nouveau fournisseur
|
NewSupplier=Nouveau fournisseur
|
||||||
History=Historique
|
History=Historique
|
||||||
ListOfSuppliers=Liste des fournisseurs
|
ListOfSuppliers=Liste des fournisseurs
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=ספק
|
|||||||
AddSupplier=הוסף הספק
|
AddSupplier=הוסף הספק
|
||||||
SupplierRemoved=הספק הוסר
|
SupplierRemoved=הספק הוסר
|
||||||
SuppliersInvoice=ספקים חשבונית
|
SuppliersInvoice=ספקים חשבונית
|
||||||
SuppliersInvoices=חשבוניות ספקים
|
|
||||||
NewSupplier=חדש הספק
|
NewSupplier=חדש הספק
|
||||||
History=היסטוריה
|
History=היסטוריה
|
||||||
ListOfSuppliers=רשימת הספקים
|
ListOfSuppliers=רשימת הספקים
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Beszállító
|
|||||||
AddSupplier=Beszállító hozzáadása
|
AddSupplier=Beszállító hozzáadása
|
||||||
SupplierRemoved=Beszállító eltávolítva
|
SupplierRemoved=Beszállító eltávolítva
|
||||||
SuppliersInvoice=Beszállító számla
|
SuppliersInvoice=Beszállító számla
|
||||||
SuppliersInvoices=Beszállítók számlái
|
|
||||||
NewSupplier=Új beszállító
|
NewSupplier=Új beszállító
|
||||||
History=Történet
|
History=Történet
|
||||||
ListOfSuppliers=Beszállító listája
|
ListOfSuppliers=Beszállító listája
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=Birgir
|
|||||||
AddSupplier=Bæta við birgja
|
AddSupplier=Bæta við birgja
|
||||||
SupplierRemoved=Birgir fjarri
|
SupplierRemoved=Birgir fjarri
|
||||||
SuppliersInvoice=Birgjar Reikningar
|
SuppliersInvoice=Birgjar Reikningar
|
||||||
SuppliersInvoices=Birgjar reikningum
|
|
||||||
NewSupplier=New birgir
|
NewSupplier=New birgir
|
||||||
History=Saga
|
History=Saga
|
||||||
ListOfSuppliers=Listi yfir birgja
|
ListOfSuppliers=Listi yfir birgja
|
||||||
|
|||||||
@ -39,4 +39,3 @@ SupplierRemoved =Fornitore rimosso
|
|||||||
SuppliersArea =Area fornitori
|
SuppliersArea =Area fornitori
|
||||||
Suppliers =Fornitori
|
Suppliers =Fornitori
|
||||||
SuppliersInvoice =Fattura Fornitore
|
SuppliersInvoice =Fattura Fornitore
|
||||||
SuppliersInvoices =Fatture fornitori
|
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=サプライヤー
|
|||||||
AddSupplier=サプライヤーを追加します。
|
AddSupplier=サプライヤーを追加します。
|
||||||
SupplierRemoved=サプライヤーは、削除
|
SupplierRemoved=サプライヤーは、削除
|
||||||
SuppliersInvoice=仕入先の請求書
|
SuppliersInvoice=仕入先の請求書
|
||||||
SuppliersInvoices=仕入先の請求書
|
|
||||||
NewSupplier=新しいサプライヤー
|
NewSupplier=新しいサプライヤー
|
||||||
History=歴史
|
History=歴史
|
||||||
ListOfSuppliers=サプライヤーのリスト
|
ListOfSuppliers=サプライヤーのリスト
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Leverandør
|
|||||||
AddSupplier=Legg til en leverandør
|
AddSupplier=Legg til en leverandør
|
||||||
SupplierRemoved=Leverandør slettet
|
SupplierRemoved=Leverandør slettet
|
||||||
SuppliersInvoice=Leverandørfaktura
|
SuppliersInvoice=Leverandørfaktura
|
||||||
SuppliersInvoices=Leverandørfakturaer
|
|
||||||
NewSupplier=Ny leverandør
|
NewSupplier=Ny leverandør
|
||||||
History=Historikk
|
History=Historikk
|
||||||
ListOfSuppliers=Leverandøroversikt
|
ListOfSuppliers=Leverandøroversikt
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Leverancier
|
|||||||
AddSupplier=Voeg een leverancier toe
|
AddSupplier=Voeg een leverancier toe
|
||||||
SupplierRemoved=Leverancier verwijderd
|
SupplierRemoved=Leverancier verwijderd
|
||||||
SuppliersInvoice=Leveranciers factuur
|
SuppliersInvoice=Leveranciers factuur
|
||||||
SuppliersInvoices=Leveranciers facturen
|
|
||||||
NewSupplier=Nieuwe leverancier
|
NewSupplier=Nieuwe leverancier
|
||||||
History=Geschiedenis
|
History=Geschiedenis
|
||||||
ListOfSuppliers=Lijst van de leveranciers
|
ListOfSuppliers=Lijst van de leveranciers
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier = Leverancier
|
|||||||
AddSupplier = Voeg een leverancier toe
|
AddSupplier = Voeg een leverancier toe
|
||||||
SupplierRemoved = Leverancier verwijderd
|
SupplierRemoved = Leverancier verwijderd
|
||||||
SuppliersInvoice = Leveranciersfactuur
|
SuppliersInvoice = Leveranciersfactuur
|
||||||
SuppliersInvoices = Leveranciersfacturen
|
|
||||||
NewSupplier = Nieuwe leverancier
|
NewSupplier = Nieuwe leverancier
|
||||||
History = Geschiedenis
|
History = Geschiedenis
|
||||||
ListOfSuppliers = Leverancierslijst
|
ListOfSuppliers = Leverancierslijst
|
||||||
|
|||||||
@ -16,7 +16,6 @@ Supplier=Dostawca
|
|||||||
AddSupplier=Dodaj dostawcy
|
AddSupplier=Dodaj dostawcy
|
||||||
SupplierRemoved=Dostawca usunięte
|
SupplierRemoved=Dostawca usunięte
|
||||||
SuppliersInvoice=Dostawcy faktury
|
SuppliersInvoice=Dostawcy faktury
|
||||||
SuppliersInvoices=Dostawcy faktur
|
|
||||||
NewSupplier=Nowy dostawca
|
NewSupplier=Nowy dostawca
|
||||||
History=Historia
|
History=Historia
|
||||||
ListOfSuppliers=Lista dostawców
|
ListOfSuppliers=Lista dostawców
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Fornecedor
|
|||||||
AddSupplier=Adicionar Fornecedor
|
AddSupplier=Adicionar Fornecedor
|
||||||
SupplierRemoved=Fornecedor Eliminado
|
SupplierRemoved=Fornecedor Eliminado
|
||||||
SuppliersInvoice=Faturas do Fornecedor
|
SuppliersInvoice=Faturas do Fornecedor
|
||||||
SuppliersInvoices=Faturas de Fornecedores
|
|
||||||
NewSupplier=Novo Fornecedor
|
NewSupplier=Novo Fornecedor
|
||||||
History=Histórico
|
History=Histórico
|
||||||
ListOfSuppliers=Lista de Fornecedores
|
ListOfSuppliers=Lista de Fornecedores
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier=Fornecedor
|
|||||||
AddSupplier=Adicionar Fornecedor
|
AddSupplier=Adicionar Fornecedor
|
||||||
SupplierRemoved=Fornecedor Eliminado
|
SupplierRemoved=Fornecedor Eliminado
|
||||||
SuppliersInvoice=Facturas do Fornecedor
|
SuppliersInvoice=Facturas do Fornecedor
|
||||||
SuppliersInvoices=Facturas de Fornecedores
|
|
||||||
NewSupplier=Novo Fornecedor
|
NewSupplier=Novo Fornecedor
|
||||||
History=Histórico
|
History=Histórico
|
||||||
ListOfSuppliers=Lista de Fornecedores
|
ListOfSuppliers=Lista de Fornecedores
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Supplier=Furnizor
|
|||||||
AddSupplier=Adauga un furnizor
|
AddSupplier=Adauga un furnizor
|
||||||
SupplierRemoved=Furnizor eliminat
|
SupplierRemoved=Furnizor eliminat
|
||||||
SuppliersInvoice=Furnizori de factură
|
SuppliersInvoice=Furnizori de factură
|
||||||
SuppliersInvoices=Furnizori facturi
|
|
||||||
NewSupplier=New furnizor
|
NewSupplier=New furnizor
|
||||||
History=Istorie
|
History=Istorie
|
||||||
ListOfSuppliers=Lista de furnizori
|
ListOfSuppliers=Lista de furnizori
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Supplier=Поставщик
|
|||||||
AddSupplier=Добавить поставщиком
|
AddSupplier=Добавить поставщиком
|
||||||
SupplierRemoved=Поставщик удален
|
SupplierRemoved=Поставщик удален
|
||||||
SuppliersInvoice=Поставщики счета
|
SuppliersInvoice=Поставщики счета
|
||||||
SuppliersInvoices=Поставщики счета
|
|
||||||
NewSupplier=Новый поставщик
|
NewSupplier=Новый поставщик
|
||||||
History=История
|
History=История
|
||||||
ListOfSuppliers=Список поставщиков
|
ListOfSuppliers=Список поставщиков
|
||||||
|
|||||||
@ -5,7 +5,6 @@ Supplier = Dobavitelj
|
|||||||
AddSupplier = Dodaj dobavitelja
|
AddSupplier = Dodaj dobavitelja
|
||||||
SupplierRemoved = Dobavitelj odstranjen
|
SupplierRemoved = Dobavitelj odstranjen
|
||||||
SuppliersInvoice = Računi dobavitelja
|
SuppliersInvoice = Računi dobavitelja
|
||||||
SuppliersInvoices = Računi dobaviteljev
|
|
||||||
NewSupplier = Nov dobavitelj
|
NewSupplier = Nov dobavitelj
|
||||||
History = Zgodovina
|
History = Zgodovina
|
||||||
ListOfSuppliers = Seznam dobaviteljev
|
ListOfSuppliers = Seznam dobaviteljev
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=Leverantör
|
|||||||
AddSupplier=Lägg till en leverantör
|
AddSupplier=Lägg till en leverantör
|
||||||
SupplierRemoved=Leverantör bort
|
SupplierRemoved=Leverantör bort
|
||||||
SuppliersInvoice=Leverantörer faktura
|
SuppliersInvoice=Leverantörer faktura
|
||||||
SuppliersInvoices=Leverantörer fakturor
|
|
||||||
NewSupplier=Ny leverantör
|
NewSupplier=Ny leverantör
|
||||||
History=Historia
|
History=Historia
|
||||||
ListOfSuppliers=Lista över leverantörer
|
ListOfSuppliers=Lista över leverantörer
|
||||||
|
|||||||
@ -12,7 +12,6 @@ Supplier=Tedarikçi
|
|||||||
AddSupplier=Bir tedarikçi ekle
|
AddSupplier=Bir tedarikçi ekle
|
||||||
SupplierRemoved=Tedarikçi kaldırıldı
|
SupplierRemoved=Tedarikçi kaldırıldı
|
||||||
SuppliersInvoice=Tedarikçi faturası
|
SuppliersInvoice=Tedarikçi faturası
|
||||||
SuppliersInvoices=Tedarikçi faturaları
|
|
||||||
NewSupplier=Yeni tedarikçi
|
NewSupplier=Yeni tedarikçi
|
||||||
History=Geçmiş
|
History=Geçmiş
|
||||||
ListOfSuppliers=Tedarikçiler listesi
|
ListOfSuppliers=Tedarikçiler listesi
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=供应商
|
|||||||
AddSupplier=新增供应商
|
AddSupplier=新增供应商
|
||||||
SupplierRemoved=供应商删除
|
SupplierRemoved=供应商删除
|
||||||
SuppliersInvoice=供应商发票
|
SuppliersInvoice=供应商发票
|
||||||
SuppliersInvoices=供应商发票
|
|
||||||
NewSupplier=新供应商
|
NewSupplier=新供应商
|
||||||
History=历史
|
History=历史
|
||||||
ListOfSuppliers=供应商名单
|
ListOfSuppliers=供应商名单
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Supplier=供應商
|
|||||||
AddSupplier=新增供應商
|
AddSupplier=新增供應商
|
||||||
SupplierRemoved=供應商刪除
|
SupplierRemoved=供應商刪除
|
||||||
SuppliersInvoice=供應商的發票
|
SuppliersInvoice=供應商的發票
|
||||||
SuppliersInvoices=供應商的發票
|
|
||||||
NewSupplier=新供應商
|
NewSupplier=新供應商
|
||||||
History=歷史
|
History=歷史
|
||||||
ListOfSuppliers=供應商名單
|
ListOfSuppliers=供應商名單
|
||||||
|
|||||||
@ -349,11 +349,8 @@ if ($id || $ref)
|
|||||||
//print $form->load_tva('tva_tx',$product->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country
|
//print $form->load_tva('tva_tx',$product->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country
|
||||||
if (! empty($socid)) // When update
|
if (! empty($socid)) // When update
|
||||||
{
|
{
|
||||||
$supplierselected=new Societe($db);
|
|
||||||
$supplierselected->fetch($socid);
|
|
||||||
$default_vat=get_default_tva($supplier, $mysoc, $product->id);
|
$default_vat=get_default_tva($supplier, $mysoc, $product->id);
|
||||||
}
|
}
|
||||||
if ($action == 'add_price' && $socid) $default_vat=$product->tva_tx; // If editing product-fourn
|
|
||||||
print '<input type="text" class="flat" size="5" name="tva_tx" value="'.(GETPOST("tva_tx")?vatrate(GETPOST("tva_tx")):($default_vat!=''?vatrate($default_vat):'')).'">';
|
print '<input type="text" class="flat" size="5" name="tva_tx" value="'.(GETPOST("tva_tx")?vatrate(GETPOST("tva_tx")):($default_vat!=''?vatrate($default_vat):'')).'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -165,8 +165,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print "<td align=\"center\">";
|
print "<td align=\"center\">";
|
||||||
print dol_print_date($db->jdate($objp->datef))."</td>";
|
print dol_print_date($db->jdate($objp->datef))."</td>";
|
||||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||||
$fac=new Facture($db);
|
print '<td align="right">'.$supplierinvoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||||
print '<td align="right">'.$fac->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1121,7 +1121,7 @@ else
|
|||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr><td><span class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></td><td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="'.$object->name.'"></td></tr>';
|
print '<tr><td><span class="fieldrequired">'.$langs->trans('ThirdPartyName').'</span></td><td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="'.dol_escape_htmltag($object->name).'"></td></tr>';
|
||||||
|
|
||||||
// Prefix
|
// Prefix
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
@ -1130,12 +1130,12 @@ else
|
|||||||
// It does not change the prefix mode using the auto numbering prefix
|
// It does not change the prefix mode using the auto numbering prefix
|
||||||
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm)
|
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="prefix_comm" value="'.$object->prefix_comm.'">';
|
print '<input type="hidden" name="prefix_comm" value="'.dol_escape_htmltag($object->prefix_comm).'">';
|
||||||
print $object->prefix_comm;
|
print $object->prefix_comm;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'">';
|
print '<input type="text" size="5" maxlength="5" name="prefix_comm" value="'.dol_escape_htmltag($object->prefix_comm).'">';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user