mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
@@ -221,14 +221,16 @@ abstract class CommonObject
|
||||
* @param int $rowid Id of line contact-element
|
||||
* @param int $statut New status of link
|
||||
* @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
|
||||
*/
|
||||
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
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set";
|
||||
$sql.= " statut = ".$statut;
|
||||
if ($type_contact_id) $sql.= ", fk_c_type_contact = '".$type_contact_id ."'";
|
||||
if ($fk_socpeople) $sql.= ", fk_socpeople = '".$fk_socpeople ."'";
|
||||
$sql.= " where rowid = ".$rowid;
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
@@ -3035,4 +3037,4 @@ abstract class CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -115,7 +115,8 @@ class HookManager
|
||||
* @param Object &$object Object to use hooks on
|
||||
* @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.
|
||||
* 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.
|
||||
*/
|
||||
function executeHooks($method, $parameters=false, &$object='', &$action='')
|
||||
@@ -127,45 +128,58 @@ class HookManager
|
||||
|
||||
// Loop on each hook to qualify modules that declared context
|
||||
$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
|
||||
{
|
||||
if (! empty($modules))
|
||||
{
|
||||
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;
|
||||
$modulealreadyexecuted[$module]=$module;
|
||||
|
||||
// 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)
|
||||
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);
|
||||
if ($method == 'doActions')
|
||||
{
|
||||
if ($action=='add') $action='create'; // TODO this change must be inside the doActions
|
||||
if ($action=='update') $action='edit'; // TODO this change must be inside the doActions
|
||||
}
|
||||
}
|
||||
$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))
|
||||
{
|
||||
$error++;
|
||||
$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 ($method == 'doActions')
|
||||
{
|
||||
if ($action=='add') $action='create';
|
||||
if ($action=='update') $action='edit';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Generic hooks that return a string (printSearchForm, printLeftBlock, formBuilddocOptions, ...)
|
||||
else if (method_exists($actionclassinstance,$method))
|
||||
// Generic hooks that return a string (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
|
||||
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);
|
||||
if (is_array($result)) $this->resArray = array_merge($this->resArray, $result);
|
||||
else $resprint.=$result;
|
||||
|
||||
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);
|
||||
// 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;
|
||||
return $resprint;
|
||||
if ($method != 'doActions' && $method != 'formObjectOptions') return $this->resPrint; // TODO remove this. When there is something to print, ->resPrint is filled.
|
||||
return ($error?-1:$resaction);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -165,6 +165,10 @@ class Form
|
||||
{
|
||||
$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))
|
||||
{
|
||||
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
||||
@@ -183,7 +187,7 @@ class Form
|
||||
$ret.=$doleditor->Create(1);
|
||||
}
|
||||
$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.='</form>'."\n";
|
||||
}
|
||||
@@ -192,6 +196,7 @@ class Form
|
||||
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 ($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))
|
||||
{
|
||||
$arraydata=explode(',',preg_replace('/^select;/','',$typeofdata));
|
||||
@@ -272,7 +277,7 @@ class Form
|
||||
if (! empty($tmp[1])) $inputOption=$tmp[1];
|
||||
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);
|
||||
$inputType=$tmp[0];
|
||||
@@ -1447,7 +1452,8 @@ class Form
|
||||
|
||||
$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>';
|
||||
else $outselect.='<option value="0"> </option>';
|
||||
|
||||
@@ -2612,9 +2618,11 @@ class Form
|
||||
* @param string $page Page
|
||||
* @param string $selected Date preselected
|
||||
* @param string $htmlname Name of input html field
|
||||
* @param int $displayhour Display hour selector
|
||||
* @param int $displaymin Display minutes selector
|
||||
* @return void
|
||||
*/
|
||||
function form_date($page, $selected, $htmlname)
|
||||
function form_date($page, $selected, $htmlname,$displayhour=0,$displaymin=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -2625,7 +2633,7 @@ class Form
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||
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 align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
|
||||
@@ -143,6 +143,9 @@ class Translate
|
||||
* If data for file already loaded, do nothing.
|
||||
* All data in translation array are stored in UTF-8 format.
|
||||
* 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
|
||||
*
|
||||
* @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
|
||||
$file_lang = $searchdir.($modulename?'/'.$modulename:'')."/langs/".$langofdir."/".$newdomain.".lang";
|
||||
$file_lang_osencoded=dol_osencode($file_lang);
|
||||
|
||||
$filelangexists=is_file($file_lang_osencoded);
|
||||
|
||||
//dol_syslog('Translate::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' file_lang='.$file_lang." => filelangexists=".$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;
|
||||
|
||||
// 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
|
||||
// use keyup instead change to avoid loosing the product id
|
||||
$("input#search_'.$htmlname.'").keyup(function() {
|
||||
$("#'.$htmlname.'").val("").trigger("change");
|
||||
$("input#search_'.$htmlname.'").keydown(function() {
|
||||
//console.log(\'purge_id_after_keydown\');
|
||||
$("#'.$htmlname.'").val("");
|
||||
});
|
||||
$("input#search_'.$htmlname.'").change(function() {
|
||||
//console.log(\'keyup\');
|
||||
$("#'.$htmlname.'").trigger("change");
|
||||
});
|
||||
// Check when keyup
|
||||
$("input#search_'.$htmlname.'").onDelayedKeyup({ handler: function() {
|
||||
@@ -116,6 +121,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
||||
dataType: "json",
|
||||
minLength: '.$minLength.',
|
||||
select: function( event, ui ) {
|
||||
//console.log(\'set value of id with \'+ui.item.id);
|
||||
$("#'.$htmlname.'").val(ui.item.id).trigger("change");
|
||||
// Disable an element
|
||||
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
|
||||
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 == 2 && (! $thirdparty_seller->localtax2_assuj || ! $thirdparty_buyer->localtax2_assuj)) return 0;
|
||||
|
||||
if ($local == 1 && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||
if ($local == 2 && ! $thirdparty_seller->localtax2_assuj) return 0;
|
||||
}
|
||||
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)
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
if (!is_object($thirdparty_seller)) 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 (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 ($mysoc->country_code == 'ES')
|
||||
{
|
||||
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=='localtax2off') return 0;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* 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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -42,15 +42,14 @@
|
||||
<td align="right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||
<?php
|
||||
$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>
|
||||
<?php
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
$colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
$colspan++;
|
||||
}
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td colspan="<?php echo $colspan; ?>"> </td>
|
||||
</tr>
|
||||
@@ -63,7 +62,7 @@ if (! empty($conf->margin->enabled)) {
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#idprod').change(function() {
|
||||
jQuery('#np_desc').focus();
|
||||
if (jQuery('#idprod').val() > 0) jQuery('#np_desc').focus();
|
||||
});
|
||||
});
|
||||
</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>
|
||||
<?php
|
||||
$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">
|
||||
<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"]:''); ?>">
|
||||
</td>
|
||||
<?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; ?>">
|
||||
@@ -115,18 +113,17 @@ if (! empty($conf->margin->enabled)) {
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (! empty($conf->service->enabled) && $dateSelector) {
|
||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
||||
$colspan = 10;
|
||||
else
|
||||
$colspan = 9;
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
$colspan++; // For the buying price
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
$colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
$colspan++;
|
||||
}
|
||||
<?php
|
||||
if (! empty($conf->service->enabled) && $dateSelector)
|
||||
{
|
||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) $colspan = 10;
|
||||
else $colspan = 9;
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
$colspan++; // For the buying price
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) $colspan++;
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES)) $colspan++;
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $bcnd[$var]; ?>>
|
||||
<td colspan="<?php echo $colspan; ?>">
|
||||
@@ -138,11 +135,15 @@ if (! empty($conf->margin->enabled)) {
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if (! empty($conf->margin->enabled)) {
|
||||
if (! empty($conf->margin->enabled))
|
||||
{
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$("#idprod").change(function() {
|
||||
@@ -177,5 +178,7 @@ $("#idprod").change(function() {
|
||||
'json');
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
||||
|
||||
@@ -953,35 +953,68 @@ class CommandeFournisseur extends CommonOrder
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur");
|
||||
|
||||
if ($this->id) {
|
||||
$num=count($this->lines);
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
|
||||
$sql.= " SET ref='(PROV".$this->id.")'";
|
||||
$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());
|
||||
/*
|
||||
* Insertion du detail des produits dans la base
|
||||
*/
|
||||
for ($i=0;$i<$num;$i++)
|
||||
{
|
||||
$result = $this->addline(
|
||||
$this->lines[$i]->desc,
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
|
||||
$sql.= " SET ref='(PROV".$this->id.")'";
|
||||
$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)
|
||||
{
|
||||
// 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
|
||||
@@ -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
|
||||
*
|
||||
@@ -1044,7 +1140,6 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
$desc=trim($desc);
|
||||
|
||||
|
||||
// Check parameters
|
||||
if ($qty < 1 && ! $fk_product)
|
||||
{
|
||||
@@ -1053,7 +1148,6 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
if ($type < 0) return -1;
|
||||
|
||||
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
@@ -78,13 +78,18 @@ $errors=array();
|
||||
|
||||
$object = new CommandeFournisseur($db);
|
||||
|
||||
// Load object
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$object->fetch($id, $ref);
|
||||
$object->fetch_thirdparty();
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||
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
|
||||
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||
}
|
||||
|
||||
// mode de reglement
|
||||
else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
||||
}
|
||||
|
||||
@@ -119,13 +122,11 @@ if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->cree
|
||||
// Set project
|
||||
else if ($action == 'classin' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->setProject($projectid);
|
||||
}
|
||||
|
||||
else if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
|
||||
$result = $object->deleteline(GETPOST('lineid'));
|
||||
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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$object->date_commande=dol_now();
|
||||
@@ -448,7 +447,6 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou
|
||||
{
|
||||
$idwarehouse=GETPOST('idwarehouse', 'int');
|
||||
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
// 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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->refuse($user);
|
||||
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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']);
|
||||
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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
$result=$object->delete($user);
|
||||
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
|
||||
else if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner)
|
||||
{
|
||||
$object->fetch($id);
|
||||
|
||||
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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->cancel($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
@@ -573,7 +592,6 @@ else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->four
|
||||
// Line ordering
|
||||
else if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->line_up($_GET['rowid']);
|
||||
|
||||
$outputlangs = $langs;
|
||||
@@ -588,7 +606,6 @@ else if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
||||
}
|
||||
else if ($action == 'down' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$object->line_down($_GET['rowid']);
|
||||
|
||||
$outputlangs = $langs;
|
||||
@@ -607,7 +624,6 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) /
|
||||
// Build document
|
||||
|
||||
// Sauvegarde le dernier module choisi pour generer un document
|
||||
$object->fetch($id);
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
if ($_REQUEST['model'])
|
||||
@@ -984,6 +1000,18 @@ if ($id > 0 || ! empty($ref))
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 2);
|
||||
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
|
||||
@@ -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);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
|
||||
/*
|
||||
* Confirmation de l'annulation
|
||||
*/
|
||||
@@ -1461,12 +1490,22 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td colspan="4"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// TODO Use the predefinedproductline_create.tpl.php file
|
||||
|
||||
// Add free products/services form
|
||||
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="action" value="addline">';
|
||||
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;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>';
|
||||
@@ -1645,6 +1684,12 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel">'.$langs->trans("CancelOrder").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
if ($user->rights->fournisseur->commande->supprimer)
|
||||
|
||||
@@ -82,7 +82,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes')
|
||||
$result=$object->createFromClone($id);
|
||||
if ($result > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result);
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?action=editfacnumber&id='.$result);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -466,10 +466,19 @@ elseif ($action == 'addline')
|
||||
}
|
||||
$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=$product->get_buyprice($_POST['idprodfournprice'], $_POST['qty']); // Just to see if a price exists for the quantity. Not used to found vat
|
||||
$idprod=0;
|
||||
$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)
|
||||
{
|
||||
@@ -1805,10 +1814,20 @@ else
|
||||
print '<td colspan="4"> </td>';
|
||||
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 '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="socid" value="'. $object->socid .'">';
|
||||
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;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td colspan="4">';
|
||||
|
||||
@@ -14,7 +14,6 @@ Supplier=المورد
|
||||
AddSupplier=إضافة مورد
|
||||
SupplierRemoved=إزالة المورد
|
||||
SuppliersInvoice=فاتورة الموردين
|
||||
SuppliersInvoices=فواتير الموردين
|
||||
NewSupplier=مورد جديد
|
||||
History=التاريخ
|
||||
ListOfSuppliers=قائمة الموردين
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=Снабдител
|
||||
AddSupplier=Добави доставчик
|
||||
SupplierRemoved=Изтрити доставчик
|
||||
SuppliersInvoice=Фактура
|
||||
SuppliersInvoices=Фактури
|
||||
NewSupplier=Нов доставчик
|
||||
History=Исторически
|
||||
ListOfSuppliers=Списък на доставчиците
|
||||
|
||||
@@ -47,7 +47,7 @@ InvoiceCustomer=Factura a client
|
||||
CustomerInvoice=Factura a client
|
||||
CustomersInvoices=Factures a clientes
|
||||
SupplierInvoice=Factura de proveïdor
|
||||
SuppliersInvoices=Factures de proveïdors
|
||||
SuppliersInvoices=Factures proveïdors
|
||||
SupplierBill=Factura de proveïdor
|
||||
SupplierBills=Factures de proveïdors
|
||||
Payment=Pagament
|
||||
|
||||
@@ -12,6 +12,7 @@ Language_en_AU=Anglès (Australia)
|
||||
Language_en_GB=Anglès (Regne Unit)
|
||||
Language_en_IN=Anglès (Índia)
|
||||
Language_en_NZ=Anglais (Nova Zelanda)
|
||||
Language_en_SA=Inglés (Aràbia Saudita)
|
||||
Language_en_US=Anglès (Estats Units)
|
||||
Language_es_ES=Espanyol
|
||||
Language_es_AR=Espanyol (Argentina)
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Proveïdor
|
||||
AddSupplier=Afegir proveïdor
|
||||
SupplierRemoved=Proveïdor eliminat
|
||||
SuppliersInvoice=Factura proveïdor
|
||||
SuppliersInvoices=Factures proveïdors
|
||||
NewSupplier=Nou proveïdor
|
||||
History=Històric
|
||||
ListOfSuppliers=Llistat de proveïdors
|
||||
|
||||
@@ -16,7 +16,6 @@ Supplier=Leverandør
|
||||
AddSupplier=Tilføj en leverandør
|
||||
SupplierRemoved=Leverandør fjernet
|
||||
SuppliersInvoice=Leverandører faktura
|
||||
SuppliersInvoices=Leverandører fakturaer
|
||||
NewSupplier=Ny leverandør
|
||||
History=Historie
|
||||
ListOfSuppliers=Liste over leverandører
|
||||
|
||||
@@ -12,7 +12,6 @@ Supplier=Lieferant
|
||||
AddSupplier=Lieferanten hinzufügen
|
||||
SupplierRemoved=Lieferant entfernt
|
||||
SuppliersInvoice=Lieferantenrechnung
|
||||
SuppliersInvoices=Lieferantenrechnungen
|
||||
NewSupplier=Neuer Lieferant
|
||||
History=Verlauf
|
||||
ListOfSuppliers=Lieferantenliste
|
||||
|
||||
@@ -12,7 +12,6 @@ Supplier=Lieferant
|
||||
AddSupplier=Lieferanten hinzufügen
|
||||
SupplierRemoved=Lieferant entfernt
|
||||
SuppliersInvoice=Lieferantenrechnung
|
||||
SuppliersInvoices=Lieferantenrechnungen
|
||||
NewSupplier=Neuer Lieferant
|
||||
History=Verlauf
|
||||
ListOfSuppliers=Lieferantenliste
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Προμηθευτής
|
||||
AddSupplier=Προσθήκη προμηθευτή
|
||||
SupplierRemoved=Ο προμηθευτής αφαιρέθηκε
|
||||
SuppliersInvoice=Τιμολόγιο προμηθευτή
|
||||
SuppliersInvoices=Τιμολόγια προμηθευτών
|
||||
NewSupplier=Νέος προμηθευτής
|
||||
History=Ιστορικό
|
||||
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
|
||||
InvoiceCustomer=Customer invoice
|
||||
CustomerInvoice=Customer invoice
|
||||
CustomersInvoices=Customer's invoices
|
||||
CustomersInvoices=Customers invoices
|
||||
SupplierInvoice=Supplier invoice
|
||||
SuppliersInvoices=Supplier's invoices
|
||||
SuppliersInvoices=Suppliers invoices
|
||||
SupplierBill=Supplier invoice
|
||||
SupplierBills=suppliers invoices
|
||||
Payment=Payment
|
||||
|
||||
@@ -14,6 +14,7 @@ Language_en_AU=English (Australia)
|
||||
Language_en_GB=English (United Kingdom)
|
||||
Language_en_IN=English (India)
|
||||
Language_en_NZ=English (New Zealand)
|
||||
Language_en_SA=English (Saudi Arabia)
|
||||
Language_en_US=English (United States)
|
||||
Language_es_ES=Spanish
|
||||
Language_es_AR=Spanish (Argentina)
|
||||
|
||||
@@ -61,7 +61,7 @@ FileUploaded=The file was successfully uploaded
|
||||
AssociatedDocuments=Documents associated with the proposal:
|
||||
ErrorCantOpenDir=Can't open directory
|
||||
DatePropal=Date of proposal
|
||||
DateEndPropal=Date end validity
|
||||
DateEndPropal=Validity ending date
|
||||
DateEndPropalShort=Date end
|
||||
ValidityDuration=Validity duration
|
||||
CloseAs=Close with status
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Supplier
|
||||
AddSupplier=Add a supplier
|
||||
SupplierRemoved=Supplier removed
|
||||
SuppliersInvoice=Suppliers invoice
|
||||
SuppliersInvoices=Suppliers invoices
|
||||
NewSupplier=New supplier
|
||||
History=History
|
||||
ListOfSuppliers=List of suppliers
|
||||
|
||||
@@ -47,7 +47,7 @@ InvoiceCustomer=Factura a cliente
|
||||
CustomerInvoice=Factura a cliente
|
||||
CustomersInvoices=Facturas a clientes
|
||||
SupplierInvoice=Factura de proveedor
|
||||
SuppliersInvoices=Facturas de proveedores
|
||||
SuppliersInvoices=Facturas proveedores
|
||||
SupplierBill=Factura de proveedor
|
||||
SupplierBills=Facturas de proveedores
|
||||
Payment=Pago
|
||||
|
||||
@@ -14,6 +14,7 @@ Language_en_AU=Inglés (Australia)
|
||||
Language_en_GB=Inglés (Reino Unido)
|
||||
Language_en_IN=Inglés (India)
|
||||
Language_en_NZ=Inglés (Nueva Zelanda)
|
||||
Language_en_SA=Inglés (Arabia Saudita)
|
||||
Language_en_US=Inglés (Estados Unidos)
|
||||
Language_es_ES=Español
|
||||
Language_es_AR=Español (Argentina)
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Proveedor
|
||||
AddSupplier=Añadir proveedor
|
||||
SupplierRemoved=Proveedor eliminado
|
||||
SuppliersInvoice=Factura proveedor
|
||||
SuppliersInvoices=Facturas proveedores
|
||||
NewSupplier=Nuevo proveedor
|
||||
History=Histórico
|
||||
ListOfSuppliers=Listado de proveedores
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=Tarnija
|
||||
AddSupplier=Lisa tarnija
|
||||
SupplierRemoved=Tarnija välja
|
||||
SuppliersInvoice=Tarnijate arve
|
||||
SuppliersInvoices=Tarnijate arvete
|
||||
NewSupplier=New tarnija
|
||||
History=Ajalugu
|
||||
ListOfSuppliers=Tarnijate
|
||||
|
||||
@@ -14,7 +14,6 @@ Supplier=المورد
|
||||
AddSupplier=إضافة مورد
|
||||
SupplierRemoved=إزالة المورد
|
||||
SuppliersInvoice=فاتورة الموردين
|
||||
SuppliersInvoices=فواتير الموردين
|
||||
NewSupplier=مورد جديد
|
||||
History=التاريخ
|
||||
ListOfSuppliers=قائمة الموردين
|
||||
|
||||
@@ -14,7 +14,6 @@ Supplier=Toimittaja
|
||||
AddSupplier=Lisää toimittaja
|
||||
SupplierRemoved=Toimittaja poistettu
|
||||
SuppliersInvoice=Tavarantoimittajat lasku
|
||||
SuppliersInvoices=Tavarantoimittajat laskut
|
||||
NewSupplier=Uuden toimittajan
|
||||
History=Historia
|
||||
ListOfSuppliers=Luettelo toimittajat
|
||||
|
||||
@@ -47,7 +47,6 @@ InvoiceCustomer=Facture client
|
||||
CustomerInvoice=Facture client
|
||||
CustomersInvoices=Factures clients
|
||||
SupplierInvoice=Facture fournisseur
|
||||
SuppliersInvoices=Factures fournisseurs
|
||||
SupplierBill=Facture fournisseur
|
||||
SupplierBills=Factures fournisseurs
|
||||
Payment=Règlement
|
||||
|
||||
@@ -14,6 +14,7 @@ Language_en_AU=Anglais (Australie)
|
||||
Language_en_GB=Anglais (Royaume-Uni)
|
||||
Language_en_IN=Anglais (Inde)
|
||||
Language_en_NZ=Anglais (Nouvelle Zeland)
|
||||
Language_en_SA=Anglais (Arabie Saoudite)
|
||||
Language_en_US=Anglais (Etats-Unis)
|
||||
Language_es_ES=Espagnol
|
||||
Language_es_AR=Espagnol (Argentine)
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Fournisseur
|
||||
AddSupplier=Ajouter un fournisseur
|
||||
SupplierRemoved=Fournisseur supprimé
|
||||
SuppliersInvoice=Facture fournisseur
|
||||
SuppliersInvoices=Factures fournisseurs
|
||||
NewSupplier=Nouveau fournisseur
|
||||
History=Historique
|
||||
ListOfSuppliers=Liste des fournisseurs
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=ספק
|
||||
AddSupplier=הוסף הספק
|
||||
SupplierRemoved=הספק הוסר
|
||||
SuppliersInvoice=ספקים חשבונית
|
||||
SuppliersInvoices=חשבוניות ספקים
|
||||
NewSupplier=חדש הספק
|
||||
History=היסטוריה
|
||||
ListOfSuppliers=רשימת הספקים
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Beszállító
|
||||
AddSupplier=Beszállító hozzáadása
|
||||
SupplierRemoved=Beszállító eltávolítva
|
||||
SuppliersInvoice=Beszállító számla
|
||||
SuppliersInvoices=Beszállítók számlái
|
||||
NewSupplier=Új beszállító
|
||||
History=Történet
|
||||
ListOfSuppliers=Beszállító listája
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=Birgir
|
||||
AddSupplier=Bæta við birgja
|
||||
SupplierRemoved=Birgir fjarri
|
||||
SuppliersInvoice=Birgjar Reikningar
|
||||
SuppliersInvoices=Birgjar reikningum
|
||||
NewSupplier=New birgir
|
||||
History=Saga
|
||||
ListOfSuppliers=Listi yfir birgja
|
||||
|
||||
@@ -39,4 +39,3 @@ SupplierRemoved =Fornitore rimosso
|
||||
SuppliersArea =Area fornitori
|
||||
Suppliers =Fornitori
|
||||
SuppliersInvoice =Fattura Fornitore
|
||||
SuppliersInvoices =Fatture fornitori
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=サプライヤー
|
||||
AddSupplier=サプライヤーを追加します。
|
||||
SupplierRemoved=サプライヤーは、削除
|
||||
SuppliersInvoice=仕入先の請求書
|
||||
SuppliersInvoices=仕入先の請求書
|
||||
NewSupplier=新しいサプライヤー
|
||||
History=歴史
|
||||
ListOfSuppliers=サプライヤーのリスト
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Leverandør
|
||||
AddSupplier=Legg til en leverandør
|
||||
SupplierRemoved=Leverandør slettet
|
||||
SuppliersInvoice=Leverandørfaktura
|
||||
SuppliersInvoices=Leverandørfakturaer
|
||||
NewSupplier=Ny leverandør
|
||||
History=Historikk
|
||||
ListOfSuppliers=Leverandøroversikt
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Leverancier
|
||||
AddSupplier=Voeg een leverancier toe
|
||||
SupplierRemoved=Leverancier verwijderd
|
||||
SuppliersInvoice=Leveranciers factuur
|
||||
SuppliersInvoices=Leveranciers facturen
|
||||
NewSupplier=Nieuwe leverancier
|
||||
History=Geschiedenis
|
||||
ListOfSuppliers=Lijst van de leveranciers
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier = Leverancier
|
||||
AddSupplier = Voeg een leverancier toe
|
||||
SupplierRemoved = Leverancier verwijderd
|
||||
SuppliersInvoice = Leveranciersfactuur
|
||||
SuppliersInvoices = Leveranciersfacturen
|
||||
NewSupplier = Nieuwe leverancier
|
||||
History = Geschiedenis
|
||||
ListOfSuppliers = Leverancierslijst
|
||||
|
||||
@@ -16,7 +16,6 @@ Supplier=Dostawca
|
||||
AddSupplier=Dodaj dostawcy
|
||||
SupplierRemoved=Dostawca usunięte
|
||||
SuppliersInvoice=Dostawcy faktury
|
||||
SuppliersInvoices=Dostawcy faktur
|
||||
NewSupplier=Nowy dostawca
|
||||
History=Historia
|
||||
ListOfSuppliers=Lista dostawców
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Fornecedor
|
||||
AddSupplier=Adicionar Fornecedor
|
||||
SupplierRemoved=Fornecedor Eliminado
|
||||
SuppliersInvoice=Faturas do Fornecedor
|
||||
SuppliersInvoices=Faturas de Fornecedores
|
||||
NewSupplier=Novo Fornecedor
|
||||
History=Histórico
|
||||
ListOfSuppliers=Lista de Fornecedores
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier=Fornecedor
|
||||
AddSupplier=Adicionar Fornecedor
|
||||
SupplierRemoved=Fornecedor Eliminado
|
||||
SuppliersInvoice=Facturas do Fornecedor
|
||||
SuppliersInvoices=Facturas de Fornecedores
|
||||
NewSupplier=Novo Fornecedor
|
||||
History=Histórico
|
||||
ListOfSuppliers=Lista de Fornecedores
|
||||
|
||||
@@ -14,7 +14,6 @@ Supplier=Furnizor
|
||||
AddSupplier=Adauga un furnizor
|
||||
SupplierRemoved=Furnizor eliminat
|
||||
SuppliersInvoice=Furnizori de factură
|
||||
SuppliersInvoices=Furnizori facturi
|
||||
NewSupplier=New furnizor
|
||||
History=Istorie
|
||||
ListOfSuppliers=Lista de furnizori
|
||||
|
||||
@@ -14,7 +14,6 @@ Supplier=Поставщик
|
||||
AddSupplier=Добавить поставщиком
|
||||
SupplierRemoved=Поставщик удален
|
||||
SuppliersInvoice=Поставщики счета
|
||||
SuppliersInvoices=Поставщики счета
|
||||
NewSupplier=Новый поставщик
|
||||
History=История
|
||||
ListOfSuppliers=Список поставщиков
|
||||
|
||||
@@ -5,7 +5,6 @@ Supplier = Dobavitelj
|
||||
AddSupplier = Dodaj dobavitelja
|
||||
SupplierRemoved = Dobavitelj odstranjen
|
||||
SuppliersInvoice = Računi dobavitelja
|
||||
SuppliersInvoices = Računi dobaviteljev
|
||||
NewSupplier = Nov dobavitelj
|
||||
History = Zgodovina
|
||||
ListOfSuppliers = Seznam dobaviteljev
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=Leverantör
|
||||
AddSupplier=Lägg till en leverantör
|
||||
SupplierRemoved=Leverantör bort
|
||||
SuppliersInvoice=Leverantörer faktura
|
||||
SuppliersInvoices=Leverantörer fakturor
|
||||
NewSupplier=Ny leverantör
|
||||
History=Historia
|
||||
ListOfSuppliers=Lista över leverantörer
|
||||
|
||||
@@ -12,7 +12,6 @@ Supplier=Tedarikçi
|
||||
AddSupplier=Bir tedarikçi ekle
|
||||
SupplierRemoved=Tedarikçi kaldırıldı
|
||||
SuppliersInvoice=Tedarikçi faturası
|
||||
SuppliersInvoices=Tedarikçi faturaları
|
||||
NewSupplier=Yeni tedarikçi
|
||||
History=Geçmiş
|
||||
ListOfSuppliers=Tedarikçiler listesi
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=供应商
|
||||
AddSupplier=新增供应商
|
||||
SupplierRemoved=供应商删除
|
||||
SuppliersInvoice=供应商发票
|
||||
SuppliersInvoices=供应商发票
|
||||
NewSupplier=新供应商
|
||||
History=历史
|
||||
ListOfSuppliers=供应商名单
|
||||
|
||||
@@ -13,7 +13,6 @@ Supplier=供應商
|
||||
AddSupplier=新增供應商
|
||||
SupplierRemoved=供應商刪除
|
||||
SuppliersInvoice=供應商的發票
|
||||
SuppliersInvoices=供應商的發票
|
||||
NewSupplier=新供應商
|
||||
History=歷史
|
||||
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
|
||||
if (! empty($socid)) // When update
|
||||
{
|
||||
$supplierselected=new Societe($db);
|
||||
$supplierselected->fetch($socid);
|
||||
$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 '</td></tr>';
|
||||
|
||||
|
||||
@@ -165,8 +165,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print "<td align=\"center\">";
|
||||
print dol_print_date($db->jdate($objp->datef))."</td>";
|
||||
print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
$fac=new Facture($db);
|
||||
print '<td align="right">'.$fac->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||
print '<td align="right">'.$supplierinvoicestatic->LibStatut($objp->paye,$objp->statut,5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -1121,7 +1121,7 @@ else
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// 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
|
||||
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
|
||||
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;
|
||||
}
|
||||
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>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user