Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_multicurrency_sync_rates

This commit is contained in:
phf 2016-03-20 15:56:54 +01:00
commit 600abc9794
149 changed files with 10099 additions and 704 deletions

109
ChangeLog
View File

@ -187,6 +187,109 @@ This is list of hooks modified:
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
FIX: #3694
FIX: #3798 #2519 Cron jobs would never be executed
FIX: #4155 Search Categories error
FIX: #4239
FIX: #4272 Error when trying to print the page "Linked objects" of a Thirdparty
FIX: #4291 Correctly filter bank card GETPOSTs
FIX: #4291 Correctly filter external calendar GETPOSTs
FIX: #4341
FIX: #4394 Untranslated label in list of expense reports
FIX: #4414 Supplier invoices use FAC_FORCE_DATE_VALIDATION client invoices property
FIX: #4418
FIX: #4425 Missing "VAT" translation in supplier order popup
FIX: #4434 Weird behaviour when enabling multiprices
FIX: #4440 Wrong price is filled by Product::fetch into multiprices arrays
FIX: #4453 SEPA Direct Debit generated XML shows a trailing comma in RmtInf field
FIX: #4528
FIX: #4556 desiredstock and seuil_stock_alerte cleared on modify product card
FIX: #4580
FIX: #4583 Incorrect call of Categories::containing throws a DoliDB error
FIX: #4649 Wrong parameters order
FIX: #4768
FIX: #4785
FIX: Add a test to show bugged module with a bad declaration of dictionaries to avoid to see clean module to be breaked.
FIX: add Croatia into list of country in EEC
FIX: add missing global def for ttc column
FIX: ajax error with multicompany module
FIX: Avoid errors when batch stock is negative
FIX: bad field in select
FIX: bad path
FIX: bad transaction level due to code of situation invoices
FIX: best sql request
FIX: bookmark's user change after update if the user hasn't superadmin right
FIX: call trigger LINEBILL_SUPPLIER_CREATE
FIX: Can not disabled an opened service line in a contract
FIX: can't clone event
FIX: can't send mail to thirdparty contact if no mail defined on thirdparty card
FIX: Check stock of batch on shippment
FIX: code corrupting database
FIX: compatibility with multicompany transversal mode
FIX: compatibility with multicompany transversal mode and more security issue
FIX: Contrat card don't consider user permissions to show active/unactive service button
FIX: CVE CVE-2015-8685
FIX: Deadlock situation. Can't edit anymore contract. FIX: List of automatic events was not visible.
FIX: disable main.inc.php hooks
FIX: do not show warning if account defined
FIX: don't see the sales representative of anothers entities
FIX: duration format
FIX: Correct problem of rights beetween tax and salaries module
FIX: Email templates not compatible with Multicompany
FIX: $fileparams is not defined
FIX: filter by socid if from customer card
FIX: for avoid conflict with "global $m" in memory.lib.php
FIX: for avoid division by 0
FIX: hover css
FIX: If option to hide automatic ECM is on, dont show menu.
FIX: if we dont use SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE the hour is displayed on pdf
FIX: Introduce hidden option to disable feature than hangs when too much data
FIX: ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant
FIX: issue when bank module is disabled FIX: missing entity filter for lines of payment
FIX: list of leave request was not showing label correctly.
FIX: MAIN_THIRDPARTY_CREATION_INDIVIDUAL syntax error in name
FIX: markRate can be 100
FIX: minor css error (pixel size must have "px"). Compatibility with old behaviour.
FIX: missing field "label"
FIX: missing signature and uniformize code between card and script
FIX: missing traduction
FIX: missing translation
FIX: missing translation key
FIX: nblignes not calculated after hook and hook can't modify this value. Usefull for modules
FIX: no database structure change is allowed into minor versions
FIX: no transaction in this place
FIX: Noway to validate a leave request for some uer even if they have permission for.
FIX: Option to disable meteo was not set correctly in edit mode
FIX: $outputlangs is not defined (dolibarr 3.7, 3.8, 3.9)
FIX: path to copyrighted files
FIX: php unit to work both with old and new setup
FIX: Purge of temp files was broken
FIX: Relative discount decimals are not saved
FIX: Removed a bugged list. Fixed another one to not count data of previous year.
FIX: retrieve correct pu_ttc (set by printObjectLine function) like in 3.7
FIX: search product in customer product prices doesn't work
FIX: Some filters are lost when paging
FIX: sql injection #4341
FIX: sql injection even when code is on several lines
FIX: sql request and total for time spen for current month
FIX: Sql syntax error in doc_generic_task_odt
FIX: Status filter don't work
FIX: Strict Standards: Only variables should be passed by reference
FIX: The part added with hidden option MAIN_DOC_USE_TIMING was included with a . instead of -. This make os think it is part of extension instead of file name.
FIX: The third dashboard don't consider user permissions
FIX: the view my task must show only task you are assigned to
FIX: to allow phpunit of migration process for 3.4 to 3.5
FIX: to allow phpunit of migration process for 3.5 to 3.6
FIX: userlocaltax
FIX: view of product image when using old path
FIX: size of image uploaded on user.
FIX: We must ue the "small" size of imge to show on card pages.
FIX: When we make a direct assignement on a task to a user, we must check he is also assigned to project (and if not assign it)
FIX: wrong fk_parent_line in credit note with invoiceAvoirWithLines option
FIX: wrong modelpdf var name
FIX: wrong object name
***** ChangeLog for 3.8.3 compared to 3.8.2 *****
FIX: #3805
FIX: #3231 [Members] Public subscription page displays GeoIP error
@ -1758,7 +1861,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
- Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #816 ] Sales journal does not reflect localtaxes
- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes
- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary
- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionary
- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres)
- Fix: [ bug #855 ] Holiday approval email in French
- Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email
@ -1777,7 +1880,7 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
- Fix: Localtax2 for Spain must be based into buyer
- Fix: [ bug #762 ] Bad profit calculation in Reporting
- Fix: bug dictionnary with wrong prefix table
- Fix: bug dictionary with wrong prefix table
***** ChangeLog for 3.3 compared to 3.2.* *****
For users:
@ -1865,7 +1968,7 @@ New experimental module:
For developers:
- New: Add webservice for thirdparty creation and list.
- New: A module can overwrite templates parts.
- New: Can add a link on title field of added dictionnary.
- New: Can add a link on title field of added dictionary.
- New: Uniformize code.
- New: Add option WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER and
WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER.

View File

@ -6,7 +6,7 @@ Dolibarr ERP & CRM is a modern software to manage your organization's activity (
It's an Open Source software (wrote in PHP language) designed for small and medium companies, foundation and freelances.
You can freely use, study, modify or distribute it according to it's Free Software licence.
You can freely use, study, modify or distribute it according to its Free Software licence.
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.

View File

@ -1108,6 +1108,14 @@ if ($nboftargetok) {
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
);
%filestoscanstableasso=(
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
);
use POSIX qw/strftime/;
foreach my $file (sort keys %filestoscansf)
{
@ -1150,17 +1158,22 @@ if ($nboftargetok) {
if ($target eq 'SF') {
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
print "Publish file ".$file." to $NEWPUBLISH/".$filestoscan{$file}."/".$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
}
else
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
$destFolder="$NEWPUBLISH/$filestoscanstableasso{$file}";
}
elsif ($target eq 'ASSO' and $NEWPUBLISH !~ /stable/) {
$destFolder="$NEWPUBLISH";
}
else # No more used
{
$dirnameonly=$file;
$dirnameonly =~ s/.*\/([^\/]+)\/[^\/]+$/$1/;
$filenameonly=$file;
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$destFolder="$NEWPUBLISH/$dirnameonly";
print "Publish file ".$file." to $NEWPUBLISH/".$dirnameonly."\n";
}
print "Publish file ".$file." to ".$destFolder."\n";
# mkdir
#my $ssh = Net::SSH::Perl->new("frs.sourceforge.net");

View File

@ -171,6 +171,8 @@ then
fi
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
#echo "drop old table"
echo "drop table llx_accounting_account;" | mysql -P$port -u$admin $passwd $base
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
export res=$?

File diff suppressed because one or more lines are too long

View File

@ -174,6 +174,10 @@ export list="
--ignore-table=$base.llx_advanced_extrafields
--ignore-table=$base.llx_advanced_extrafields_options
--ignore-table=$base.llx_advanced_extrafields_values
--ignore-table=$base.llx_askpricesupplier
--ignore-table=$base.llx_askpricesupplier_extrafields
--ignore-table=$base.llx_askpricesupplierdet
--ignore-table=$base.llx_askpricesupplierdet_extrafields
--ignore-table=$base.llx_bookkeeping
--ignore-table=$base.llx_bootstrap
--ignore-table=$base.llx_bt_namemap
@ -196,6 +200,11 @@ export list="
--ignore-table=$base.llx_cabinetmed_motifcons
--ignore-table=$base.llx_cabinetmed_patient
--ignore-table=$base.llx_cabinetmed_societe
--ignore-table=$base.llx_congespayes
--ignore-table=$base.llx_congespayes_config
--ignore-table=$base.llx_congespayes_events
--ignore-table=$base.llx_congespayes_logs
--ignore-table=$base.llx_congespayes_users
--ignore-table=$base.llx_dolicloud_customers
--ignore-table=$base.llx_dolicloud_stats
--ignore-table=$base.llx_dolicloud_emailstemplates
@ -205,6 +214,7 @@ export list="
--ignore-table=$base.llx_filemanager_roots
--ignore-table=$base.llx_fournisseur_ca
--ignore-table=$base.llx_google_maps
--ignore-table=$base.llx_milestone
--ignore-table=$base.llx_monitoring_probes
--ignore-table=$base.llx_notes
--ignore-table=$base.llx_pos_cash

View File

@ -58,6 +58,7 @@ $myparam = GETPOST('myparam','alpha');
$search_field1=GETPOST("search_field1");
$search_field2=GETPOST("search_field2");
$search_myfield=GETPOST('search_myfield');
$optioncss = GETPOST('optioncss','alpha');
// Load variable for pagination
@ -274,6 +275,11 @@ if ($resql)
print $langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall);
}
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
$moreforfilter.= '</div>';
if (! empty($moreforfilter))
{
print '<div class="liste_titre liste_titre_bydiv centpercent">';

View File

@ -30,6 +30,7 @@ require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
$langs->load("compta");
$langs->load("bills");
@ -195,12 +196,7 @@ if (! $conf->use_javascript_ajax) {
print "</td>";
} else {
print '<td>';
$listmodelcsv = array (
'1' => $langs->trans("Modelcsv_normal"),
'2' => $langs->trans("Modelcsv_CEGID"),
'3' => $langs->trans("Modelcsv_COALA"),
'4' => $langs->trans("Modelcsv_bob50")
);
$listmodelcsv = AccountancyExport::getType();
print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0);
print '</td>';

View File

@ -218,16 +218,31 @@ if ($action == 'delbookkeeping') {
exit();
}
} elseif ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = 'bookkepping';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php';
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
if ($result < 0) {
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
if (in_array($conf->global->ACCOUNTING_EXPORT_MODELCSV, array(5,6))) // TODO remove the conditional and keep the code in the "else"
{
$accountancyexport = new AccountancyExport($db);
$accountancyexport->export($object->lines);
if (!empty($accountancyexport->errors)) setEventMessages('', $accountancyexport->errors, 'errors');
else exit;
}
}
// TODO remove next 3 lines and foreach to implement the AccountancyExport method for each model
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = 'bookkepping';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
foreach ( $object->lines as $line ) {
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {

View File

@ -0,0 +1,287 @@
<?php
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/accountancy/class/accountancyexport.class.php
*/
/**
* Class AccountancyExport
*
* Manage the different format accountancy export
*/
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
class AccountancyExport
{
/**
* @var Type of export
*/
public static $EXPORT_TYPE_NORMAL = 1;
public static $EXPORT_TYPE_CEGID = 2;
public static $EXPORT_TYPE_COALA = 3;
public static $EXPORT_TYPE_BOB50 = 4;
public static $EXPORT_TYPE_CIEL = 5;
public static $EXPORT_TYPE_QUADRATUS = 6;
/**
* @var string[] Error codes (or messages)
*/
public $errors = array();
/**
* @var string Separator
*/
public $separator = '';
/**
* @var string End of line
*/
public $end_line = '';
/**
* Constructor
*
* @param DoliDb $db Database handler
*/
public function __construct(DoliDB &$db)
{
global $conf;
$this->db = &$db;
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$this->end_line = "\n";
return 1;
}
/**
* Get all export type are available
*
* @return array of type
*/
public static function getType()
{
global $langs;
return array (
self::$EXPORT_TYPE_NORMAL => $langs->trans('Modelcsv_normal'),
self::$EXPORT_TYPE_CEGID => $langs->trans('Modelcsv_CEGID'),
self::$EXPORT_TYPE_COALA => $langs->trans('Modelcsv_COALA'),
self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'),
self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'),
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus')
);
}
/**
* Download the export
*
* @return void
*/
public static function downloadFile()
{
global $conf;
$journal = 'bookkepping';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
}
/**
* Function who chose which export to use with the default config
*
* @param unknown $TData data
*/
public function export(&$TData)
{
global $conf, $langs;
switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) {
case self::$EXPORT_TYPE_NORMAL:
$this->exportNormal($TData);
break;
case self::$EXPORT_TYPE_CEGID:
$this->exportCegid($TData);
break;
case self::$EXPORT_TYPE_COALA:
$this->exportCoala($TData);
break;
case self::$EXPORT_TYPE_BOB50:
$this->exportBob50($TData);
break;
case self::$EXPORT_TYPE_CIEL:
$this->exportCiel($TData);
break;
case self::$EXPORT_TYPE_QUADRATUS:
$this->exportQuadratus($TData);
break;
default:
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
break;
}
if (empty($this->errors)) self::downloadFile();
}
/**
* Export format : Normal
*
* @param unknown $TData data
*
* @return void
*/
public function exportNormal(&$TData)
{
}
/**
* Export format : CEGID
*
* @param unknown $TData data
*
* @return void
*/
public function exportCegid(&$TData)
{
}
/**
* Export format : COALA
*
* @param unknown $TData data
*
* @return void
*/
public function exportCoala(&$TData)
{
}
/**
* Export format : BOB50
*
* @param unknown $TData data
*
* @return void
*/
public function exportBob50(&$TData)
{
}
/**
* Export format : CIEL
*
* @param unknown $TData data
*
* @return void
*/
public function exportCiel(&$TData)
{
global $conf;
$i=1;
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ($TData as $data)
{
$code_compta = $data->numero_compte;
if (!empty($data->code_tiers)) $code_compta = $data->code_tiers;
$Tab = array();
$Tab['num_ecriture'] = str_pad($i, 5);
$Tab['code_journal'] = str_pad($data->code_journal, 2);
$Tab['date_ecriture'] = $date_ecriture;
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref.$data->label_compte, 25), 25);
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
$Tab['type_montant'] = str_pad($data->sens, 1);
$Tab['vide'] = str_repeat(' ', 18);
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_compte, 34), 34);
$Tab['end'] = 'O2003';
$Tab['end_line'] = $this->end_line;
print implode($Tab);
$i++;
}
}
/**
* Export format : Quadratus
*
* @param unknown $TData data
*
* @return void
*/
public function exportQuadratus(&$TData)
{
global $conf;
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ($TData as $data)
{
$code_compta = $data->numero_compte;
if (!empty($data->code_tiers)) $code_compta = $data->code_tiers;
$Tab = array();
$Tab['type_ligne'] = 'M';
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 8), 8);
$Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
$Tab['folio'] = '000';
$Tab['date_ecriture'] = $date_ecriture;
$Tab['filler'] = ' ';
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref.' '.$data->label_compte, 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
$Tab['montant'] = str_pad(abs($data->montant)*100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount
$Tab['contrepartie'] = str_repeat(' ', 8);
if (!empty($data->date_echeance)) $Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
else $Tab['date_echeance'] = '000000';
$Tab['lettrage'] = str_repeat(' ', 5);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 5), 5);
$Tab['filler2'] = str_repeat(' ', 20);
$Tab['num_piece2'] = str_pad(self::trunc($data->piece_num, 8), 8);
$Tab['devis'] = str_pad($conf->currency, 3);
$Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3);
$Tab['filler3'] = str_repeat(' ', 3);
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref.' '.$data->label_compte, 32), 32);
$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10);
$Tab['filler4'] = str_repeat(' ', 73);
$Tab['end_line'] = $this->end_line;
print implode($Tab);
}
}
/**
*
* @param unknown $str data
* @param unknown $size data
*/
public static function trunc($str, $size)
{
return dol_trunc($str, $size, 'right', 'UTF-8', 1);
}
}

View File

@ -170,7 +170,7 @@ class BookKeeping extends CommonObject
$this->piece_num = 0;
// first check if line not yet in bookkeeping
$sql = "SELECT count(*)";
$sql = "SELECT count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE doc_type = '" . $this->doc_type . "'";
$sql .= " AND fk_docdet = " . $this->fk_docdet;
@ -180,8 +180,8 @@ class BookKeeping extends CommonObject
$resql = $this->db->query($sql);
if ($resql) {
$row = $this->db->fetch_array($resql);
if ($row[0] == 0) {
$row = $this->db->fetch_object($resql);
if ($row->nb == 0) {
// Determine piece_num
$sqlnum = "SELECT piece_num";

View File

@ -312,7 +312,6 @@ if ($action == 'writebookkeeping') {
if ($resultmid) {
$objmid = $db->fetch_object($resultmid);
$bookkeeping->doc_ref = $objmid->ref_supplier . ' (' . $objmid->ref . ')';
;
}
}
@ -414,7 +413,8 @@ if ($action == 'export_csv') {
$companystatic = new Client($db);
// Model Cegid Expert Export
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) {
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2)
{
$sep = ";";
foreach ( $tabpay as $key => $val ) {

View File

@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
// Langs
$langs->load("commercial");
$langs->load("compta");
$langs->load("bills");
$langs->load("other");
@ -141,14 +142,15 @@ if ($result) {
// Situation invoices handling
$line = new FactureLigne($db);
$line->fetch($obj->rowid);
$prev_progress = $line->get_prev_progress();
$line->fetch($obj->fdid); // id of line
$prev_progress = 0;
if ($obj->type == Facture::TYPE_SITUATION) {
// Avoid divide by 0
// Avoid divide by 0
if ($obj->situation_percent == 0) {
$situation_ratio = 0;
} else {
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
$prev_progress = $line->get_prev_progress($obj->rowid); // id of invoice
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
}
} else {
$situation_ratio = 1;

View File

@ -254,11 +254,11 @@ if ($result) {
print '<tr class="liste_titre">';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_invoice" value="' . $search_invoice . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_ref" value="' . $search_ref . '"></td>';
print '<td class="liste_titre">%<input type="text" class="flat" size="15" name="search_ref" value="' . $search_ref . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="' . $search_label . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="' . $search_desc . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="10" name="search_amount" value="' . $search_amount . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
print '<td class="liste_titre" align="center">%<input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '"></td>';
print '<td class="liste_titre" align="center">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td align="right" colspan="2" class="liste_titre">';

View File

@ -141,7 +141,7 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="18"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -71,6 +72,7 @@ if ($action == 'update' && empty($_POST["cancel"]))
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID"), 'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"),'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"),'chaine',0,'',$conf->entity);
// Content parameters
dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity);
@ -274,6 +276,8 @@ if ($action == 'edit')
jQuery(".drag").hide();
jQuery("#MAIN_MAIL_EMAIL_TLS").val(0);
jQuery("#MAIN_MAIL_EMAIL_TLS").prop("disabled", true);
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0);
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").prop("disabled", true);
';
if ($linuxlike)
{
@ -300,6 +304,8 @@ if ($action == 'edit')
jQuery(".drag").show();
jQuery("#MAIN_MAIL_EMAIL_TLS").val('.$conf->global->MAIN_MAIL_EMAIL_TLS.');
jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr("disabled");
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS.');
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").removeAttr("disabled");
jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr("disabled");
jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr("disabled");
jQuery("#MAIN_MAIL_SMTP_SERVER").show();
@ -312,6 +318,14 @@ if ($action == 'edit')
jQuery("#MAIN_MAIL_SENDMODE").change(function() {
initfields();
});
jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() {
if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val() == 1)
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0);
});
jQuery("#MAIN_MAIL_EMAIL_STARTTLS").change(function() {
if (jQuery("#MAIN_MAIL_EMAIL_TLS").val() == 1)
jQuery("#MAIN_MAIL_EMAIL_TLS").val(0);
});
})';
print '</script>'."\n";
}
@ -475,6 +489,20 @@ if ($action == 'edit')
else print yn(0).' ('.$langs->trans("NotSupported").')';
print '</td></tr>';
// STARTTLS
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'smtps'))
{
if (function_exists('openssl_open'))
{
print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1);
}
else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
else print yn(0).' ('.$langs->trans("NotSupported").')';
print '</td></tr>';
// Separator
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="2">&nbsp;</td></tr>';
@ -579,6 +607,20 @@ else
else print yn(0).' ('.$langs->trans("NotSupported").')';
print '</td></tr>';
// STARTTLS
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
if (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'smtps')
{
if (function_exists('openssl_open'))
{
print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS);
}
else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')';
}
else print yn(0).' ('.$langs->trans("NotSupported").')';
print '</td></tr>';
// Separator
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="2">&nbsp;</td></tr>';

View File

@ -38,6 +38,9 @@ $mode=GETPOST('mode', 'alpha')?GETPOST('mode', 'alpha'):(isset($_SESSION['mode']
$action=GETPOST('action','alpha');
$value=GETPOST('value', 'alpha');
$page_y=GETPOST('page_y','int');
$search_keyword=GETPOST('search_keyword','alpha');
$search_status=GETPOST('search_status','alpha');
$search_nature=GETPOST('search_nature','alpha');
if (! $user->admin)
accessforbidden();
@ -59,6 +62,11 @@ $familyinfo=array(
'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")),
);
$param='';
if ($search_keyword) $param.='&search_keyword='.urlencode($search_keyword);
if ($search_status) $param.='&search_status='.urlencode($search_status);
if ($search_nature) $param.='&search_nature='.urlencode($search_nature);
/*
@ -69,7 +77,7 @@ if ($action == 'set' && $user->admin)
{
$result=activateModule($value);
if ($result) setEventMessages($result, null, 'errors');
header("Location: modules.php?mode=".$mode.($page_y?'&page_y='.$page_y:''));
header("Location: modules.php?mode=".$mode.$param.($page_y?'&page_y='.$page_y:''));
exit;
}
@ -77,10 +85,18 @@ if ($action == 'reset' && $user->admin)
{
$result=unActivateModule($value);
if ($result) setEventMessages($result, null, 'errors');
header("Location: modules.php?mode=".$mode.($page_y?'&page_y='.$page_y:''));
header("Location: modules.php?mode=".$mode.$param.($page_y?'&page_y='.$page_y:''));
exit;
}
if (GETPOST('buttonreset'))
{
$search_keyword='';
$search_status='';
$search_nature='';
}
/*
* View
@ -231,16 +247,10 @@ print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup');
// Start to show page
if (empty($mode)) $mode='common';
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
//if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
//if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
//if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
//print '<br>'."\n";
$h = 0;
$categidx='common'; // Main
@ -252,35 +262,6 @@ if (! empty($categ[$categidx]))
$h++;
}
/*
$categidx='other'; // Other
if (! empty($categ[$categidx]))
{
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("ModulesOther");
$head[$h][2] = 'other';
$h++;
}
$categidx='interfaces'; // Interfaces
if (! empty($categ[$categidx]))
{
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("ModulesInterfaces");
$head[$h][2] = 'interfaces';
$h++;
}
$categidx='functional'; // Not used
if (! empty($categ[$categidx]))
{
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
$head[$h][1] = $langs->trans("ModulesSpecial");
$head[$h][2] = 'functional';
$h++;
}
*/
$categidx='expdev';
if (! empty($categ[$categidx]))
{
@ -307,20 +288,46 @@ $var=true;
if ($mode != 'marketplace')
{
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
/*
print '<tr class="liste_titre">'."\n";
print " <td colspan=\"2\">".$langs->trans("Module")."</td>\n";
print " <td>".$langs->trans("Description")."</td>\n";
print " <td align=\"center\">".$langs->trans("Version")."</td>\n";
print ' <td align="center">'.$langs->trans("Status").'</td>'."\n";
print ' <td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
print "</tr>\n";
*/
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
$moreforfilter.= '</div>';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Status') . ': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1);
$moreforfilter.= '</div>';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Nature') . ': '.$form->selectarray('search_nature', array('standard'=>$langs->transnoentitiesnoconv("Standard"), 'external'=>$langs->transnoentitiesnoconv("External")), $search_nature, 1);
$moreforfilter.= '</div>';
$moreforfilter.=' ';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.='<input type="submit" name="buttonsubmit" class="button" value="'.dol_escape_htmltag($langs->trans("Refresh")).'">';
$moreforfilter.=' ';
$moreforfilter.='<input type="submit" name="buttonreset" class="button" value="'.dol_escape_htmltag($langs->trans("Reset")).'">';
$moreforfilter.= '</div>';
if (! empty($moreforfilter))
{
//print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
//print '</div>';
}
print '<br><br><br>';
// Show list of modules
print '<table summary="list_of_modules" id="list_of_modules" class="liste" width="100%">'."\n";
$oldfamily='';
foreach ($orders as $key => $value)
@ -343,8 +350,34 @@ if ($mode != 'marketplace')
dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
continue;
}
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
// Check filters
$modulename=$objMod->getName();
$moduledesc=$objMod->getDesc();
$moduledesclong=$objMod->getDescLong();
$moduleauthor=$objMod->getPublisher();
if ($search_keyword)
{
$qualified=0;
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
) $qualified=1;
if (! $qualified) continue;
}
if ($search_status)
{
if ($search_status == 'active' && empty($conf->global->$const_name)) continue;
if ($search_status == 'disabled' && ! empty($conf->global->$const_name)) continue;
}
if ($search_nature)
{
if ($search_nature == 'external' && $objMod->isCoreOrExternalModule() != 'external') continue;
if ($search_nature == 'standard' && $objMod->isCoreOrExternalModule() == 'external') continue;
}
// Load all lang files of module
if (isset($objMod->langfiles) && is_array($objMod->langfiles))
@ -440,7 +473,7 @@ if ($mode != 'marketplace')
}
else
{
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value=' . $modName . '&amp;mode=' . $mode . '">';
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=reset&amp;value=' . $modName . '&amp;mode=' . $mode . $param . '">';
print img_picto($langs->trans("Activated"),'switch_on');
print '</a>';
}
@ -504,7 +537,7 @@ if ($mode != 'marketplace')
else
{
// Module non actif
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value=' . $modName . '&amp;mode=' . $mode . '">';
print '<a class="reposition" href="modules.php?id='.$objMod->numero.'&amp;module_position='.$module_position.'&amp;action=set&amp;value=' . $modName . '&amp;mode=' . $mode . $param . '">';
print img_picto($langs->trans("Disabled"),'switch_off');
print "</a>\n";
}
@ -529,7 +562,7 @@ else
$var=!$var;
print "<tr ".$bc[$var].">\n";
$url='http://www.dolistore.com';
$url='https://www.dolistore.com';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
print '<td>'.$langs->trans("DoliStoreDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
@ -537,7 +570,7 @@ else
$var=!$var;
print "<tr ".$bc[$var].">\n";
$url='http://partners.dolibarr.org';
$url='https://partners.dolibarr.org';
print '<td align="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" width="180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner_int.png"></a></td>';
print '<td>'.$langs->trans("DoliPartnersDesc").'</td>';
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Bahfir Abbes <contact@dolibarrpar.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -169,6 +170,7 @@ if ($conf->societe->enabled)
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
print '<tr '.$bc[$var].'>';
print '<td>'.$elementLabel.'</td>';
@ -213,6 +215,7 @@ foreach($listofnotifiedevents as $notifiedevent)
elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal');
elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill');
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
print '<tr '.$bc[$var].'>';
print '<td>'.$elementLabel.'</td>';

View File

@ -118,7 +118,7 @@ print "<br>\n";
print $langs->trans("CurrentUserLanguage").': <strong>'.$langs->defaultlang.'</strong><br>';
print '<br>';
print img_warning().' '.$langs->trans("SomeTranslationAreUncomplete").'<br>';
print img_info().' '.$langs->trans("SomeTranslationAreUncomplete").'<br>';
$urlwikitranslatordoc='http://wiki.dolibarr.org/index.php/Translator_documentation';
print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_blank">'.$urlwikitranslatordoc.'</a><br>';
@ -134,7 +134,7 @@ print '<input type="hidden" id="action" name="action" value="">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Language").'</td>';
print '<td>'.$langs->trans("Language").' (en_US, es_MX, ...)</td>';
print '<td>'.$langs->trans("Key").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
if (! empty($conf->multicompany->enabled) && !$user->entity) print '<td>'.$langs->trans("Entity").'</td>';

View File

@ -59,7 +59,7 @@ exit;*/
print '<div class="inline-block" style="vertical-align: top">';
print '<div class="principal">';
$page=GETPOST('menu','alpha');
$page=GETPOST('menutpl','alpha');
if (empty($page)) $page='facturation';
if (in_array(

View File

@ -42,7 +42,7 @@ $langs->load("cashdesk");
*/
//header("Content-type: text/html; charset=UTF-8");
header("Content-type: text/html; charset=".$conf->file->character_set_client);
//header("Content-type: text/html; charset=".$conf->file->character_set_client);
$arrayofjs=array();
$arrayofcss=array('/cashdesk/css/style.css');
@ -62,8 +62,6 @@ print '<div class="conteneur">'."\n";
print '<div class="conteneur_img_gauche">'."\n";
print '<div class="conteneur_img_droite">'."\n";
print '<h1 class="entete"><span>POINT OF SALE</span></h1>'."\n";
print '<div class="menu_principal">'."\n";
include_once 'tpl/menu.tpl.php';
print '</div>'."\n";

View File

@ -99,26 +99,17 @@ class Facturation
$product = new Product($db);
$product->fetch($this->id);
$sql = "SELECT taux";
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva";
$sql.= " WHERE rowid = ".$this->tva();
dol_syslog("ajoutArticle", LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
$vat_rate=$obj->taux;
//var_dump($vat_rate);exit;
}
else
{
dol_print_error($db);
}
$vatrowid = $this->tva();
$tmp = getTaxesFromId($vatrowid);
$vat_rate = $tmp['rate'];
$vat_npr = $tmp['npr'];
$localtaxarray = getLocalTaxesFromRate($vatrowid, 0, $societe, $mysoc, 1);
// Define part of HT, VAT, TTC
$resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',0,$product->type,$mysoc);
$resultarray=calcul_price_total($this->qte, $this->prix(), $this->remisePercent(), $vat_rate, 0, 0, 0, 'HT', $use_npr, $product->type, $mysoc, $locataxarray);
// Calcul du total ht sans remise
$total_ht = $resultarray[0];
@ -442,9 +433,8 @@ class Facturation
* @param int $aTva Vat
* @return int Vat
*/
public function tva ( $aTva=null )
public function tva($aTva=null)
{
if ( !$aTva ) {
return $this->tva;
@ -467,9 +457,8 @@ class Facturation
* @param string $aNumFacture Invoice ref
* @return string Invoice ref
*/
public function numInvoice( $aNumFacture=null )
public function numInvoice($aNumFacture=null)
{
if ( !$aNumFacture ) {
return $this->num_facture;

View File

@ -20,7 +20,6 @@ body {
margin: 0;
padding: 0;
text-align: center;
font: 0.7em verdana, arial, helvetica;
}
p {
@ -46,6 +45,15 @@ p {
.contenu {
width: 100%;
text-align: center;
padding-top: 20px;
}
.logo {
text-align: center;
}
.logopos {
padding-top: 20px;
max-height: 40px;
}
/* ------------------- Header ------------------- */
@ -61,7 +69,7 @@ p {
/* ------------------- Menu ------------------- */
.menu_principal {
margin: 0 20px 20px 15px;
margin: 0;
font-size: 14px;
height: 84px;
background: #CCCCCC;
@ -80,7 +88,7 @@ p {
.menu {
margin: 0;
list-style-type: none;
padding: 10px 0 0;
padding: 8px 0 0;
}
.menu li {
@ -88,34 +96,6 @@ p {
padding-right: 10px;
}
.menu_choix1,.menu_choix2 {
font-size: 1.4em;
text-align: left;
}
.menu_choix1 a,.menu_choix2 a {
display: block;
color: #fff;
text-decoration: none;
padding-top: 18px;
padding-left: 54px;
font-size: 14px;
height: 48px;
background: url('../img/new.png') top left no-repeat;
}
.menu_choix1 a {
background: url('../img/new.png') top left no-repeat;
}
.menu_choix2 a {
background: url('../img/gescom.png') top left no-repeat;
}
.menu_choix1 a:hover,.menu_choix2 a:hover {
color: #6d3f6d;
}
.menu_choix0 {
font-size: 10px;
text-align: right;

View File

@ -37,7 +37,7 @@ switch ( $_GET['action'] )
default:
if ( $_POST['hdnSource'] != 'NULL' )
{
$sql = "SELECT p.rowid, p.ref, p.price, p.tva_tx";
$sql = "SELECT p.rowid, p.ref, p.price, p.tva_tx, p.recuperableonly";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = ".$conf_fkentrepot;
@ -66,19 +66,23 @@ switch ( $_GET['action'] )
{
$ret[$key] = $value;
}
// Here $ret['tva_tx'] is vat rate of product but we want to not use the one into table but found by function
$productid = $ret['rowid'];
$product = new Product($db);
$product->fetch($productid);
/** add Ditto for MultiPrix*/
if (! empty($conf->global->PRODUIT_MULTIPRICES))
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
$societe = new Societe($db);
$societe->fetch($thirdpartyid);
$tva_tx = get_default_tva($mysoc,$societe,$productid);
$tva_npr = get_default_npr($mysoc,$societe,$productid);
if (empty($tva_tx)) $tva_npr=0;
dol_syslog('tva_tx='.$tva_tx.'-tva_npr='.$tva_npr);
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($societe->price_level))
{
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
$productid = $ret['rowid'];
$societe = new Societe($db);
$societe->fetch($thirdpartyid);
$product = new Product($db);
$product->fetch($productid);
if(isset($product->multiprices[$societe->price_level]))
{
$ret['price'] = $product->multiprices[$societe->price_level];
@ -86,16 +90,39 @@ switch ( $_GET['action'] )
// $product->multiprices_min[$societe->price_level];
// $product->multiprices_min_ttc[$societe->price_level];
// $product->multiprices_base_type[$societe->price_level];
$ret['tva_tx'] = $product->multiprices_tva_tx[$societe->price_level];
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{
if (isset($prod->multiprices_tva_tx[$societe->price_level])) $tva_tx=$prod->multiprices_tva_tx[$societe->price_level];
if (isset($prod->multiprices_recuperableonly[$societe->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$societe->price_level];
if (empty($tva_tx)) $tva_npr=0;
}
}
}
/** end add Ditto */
$ret['tva_tx'] = $tva_tx;
$ret['tva_npr'] = $tva_npr;
//var_dump('tva_tx='.$ret['tva_tx'].'-tva_npr='.$ret['tva_npr'].'-'.$conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL);exit;
$obj_facturation->id($ret['rowid']);
$obj_facturation->ref($ret['ref']);
$obj_facturation->stock($ret['reel']);
$obj_facturation->prix($ret['price']);
$obj_facturation->tva($ret['tva_tx']);
// Use $ret['tva_tx'] / ret['tva_npr'] to find vat id
$vatrowid = null;
$sqlfindvatid = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'c_tva';
$sqlfindvatid.= ' WHERE taux = '.$ret['tva_tx'].' AND recuperableonly = '.(int) $ret['tva_npr'];
$sqlfindvatid.= ' AND fk_pays = '.$mysoc->country_id;
$resqlfindvatid=$db->query($sqlfindvatid);
if ($resqlfindvatid)
{
$obj = $db->fetch_object($resqlfindvatid);
if ($obj) $vatrowid = $obj->rowid;
}
else dol_print_error($db);
dol_syslog("save vatrowid=".$vatrowid);
$obj_facturation->tva($vatrowid); // Save vat it for next use
// Definition du filtre pour n'afficher que le produit concerne
if ( $_POST['hdnSource'] == 'LISTE' )
@ -107,7 +134,7 @@ switch ( $_GET['action'] )
$filtre = $_POST['txtRef'];
}
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation&filtre='.$filtre;
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$filtre;
}
else
{
@ -115,11 +142,11 @@ switch ( $_GET['action'] )
if ( $_POST['hdnSource'] == 'REF' )
{
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation&filtre='.$_POST['txtRef'];
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$_POST['txtRef'];
}
else
{
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation';
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
}
}
}
@ -130,40 +157,38 @@ switch ( $_GET['action'] )
}
else
{
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation';
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
}
break;
case 'ajout_article': // We have clicked on button "Add product"
//var_dump('ajout_article');
//exit;
if (! empty($obj_facturation->id)) // A product was previously selected and stored in session, so we can add it
{
dol_syslog("facturation_verif save vat ".$_POST['selTva']);
$obj_facturation->qte($_POST['txtQte']);
$obj_facturation->tva($_POST['selTva']);
$obj_facturation->tva($_POST['selTva']); // Save VAT selected so we can use it for next product
$obj_facturation->remisePercent($_POST['txtRemise']);
$obj_facturation->ajoutArticle(); // This add an entry into $_SESSION['poscart']
// We update prixTotalTtc
}
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation';
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
break;
case 'suppr_article':
$obj_facturation->supprArticle($_GET['suppr_id']);
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation';
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation';
break;
}
// We saved object obj_facturation
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
//var_dump($_SESSION['serObjFacturation']);
header('Location: '.$redirection);
exit;

View File

@ -58,9 +58,8 @@ top_htmlhead('','',0,0,'',$arrayofcss);
<div class="conteneur_img_gauche">
<div class="conteneur_img_droite">
<h1 class="entete"></h1>
<div class="menu_principal hideonsmartphone">
<div class="logo"><?php print '<img class="logopos" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&amp;file='.urlencode('/thumbs/'.$mysoc->logo_small).'">'; ?></div>
</div>
<div class="contenu">

View File

@ -125,7 +125,7 @@ if ( $retour >= 0 )
$_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] = ($bankid_cb > 0 ? $bankid_cb : '');
//var_dump($_SESSION);exit;
header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation&id=NOUV');
header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&id=NOUV');
exit;
}
else

View File

@ -119,7 +119,7 @@ $langs->load("cashdesk");
<td></td>
<!-- Choix de la remise -->
<td><input class="texte1" type="text" id="txtRemise" name="txtRemise" value="0" onkeyup="javascript: modif();" onfocus="javascript: this.select();"/>
<?php print genkeypad("txtRemise", "frmQte");?>
<?php print genkeypad("txtRemise", "frmQte");?>
</td>
<!-- Affichage du total HT -->
<td><input class="texte1_off" type="text" name="txtTotal" value="" disabled /></td><td></td>
@ -128,16 +128,17 @@ $langs->load("cashdesk");
<?php //var_dump($tab_tva); ?>
<select name="selTva" onchange="javascript: modif();" >
<?php
$tva_tx = $obj_facturation->tva();
$tab_tva_size=count($tab_tva);
for($i=0;$i < $tab_tva_size;$i++) {
$tva_tx = $obj_facturation->tva(); // Try to get a previously entered VAT rowid. First time, this will return empty.
if ( $tva_tx == $tab_tva[$i]['taux'] )
$tab_tva_size=count($tab_tva); // $tab_tva contains list of possible vat array('rowid'=> , 'taux'=> )
for ($i=0;$i < $tab_tva_size;$i++)
{
if ($tva_tx == $tab_tva[$i]['rowid'])
$selected = 'selected';
else
$selected = '';
$selected = '';
echo ('<option '.$selected.' value="'.$tab_tva[$i]['rowid'].'">'.$tab_tva[$i]['taux'].'</option>'."\n ");
echo '<option '.$selected.' value="'.$tab_tva[$i]['rowid'].'">'.$tab_tva[$i]['taux'].'</option>'."\n ";
}
?>
</select>

View File

@ -62,7 +62,7 @@ $langs->load("main");
print '<div class="menu_bloc">';
print '<ul class="menu">';
// Link to new sell
print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
// Open new tab on backoffice (this is not a disconnect from POS)
print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
// Disconnect

View File

@ -113,7 +113,7 @@ $langs->load("bills");
<p class="note_label"><?php echo $langs->trans("Notes"); ?><br><textarea class="textarea_note" name="txtaNotes"></textarea></p>
<div class="center"><input class="button" type="submit" name="btnValider" value="<?php echo $langs->trans("ValidateInvoice"); ?>" /><br>
<br><a class="lien1" href="affIndex.php?menu=facturation"><?php echo $langs->trans("RestartSelling"); ?></a>
<br><a class="lien1" href="affIndex.php?menutpl=facturation"><?php echo $langs->trans("RestartSelling"); ?></a>
</div>
</form>

View File

@ -42,7 +42,7 @@ switch ($action)
default:
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=validation';
$redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=validation';
break;
@ -85,13 +85,13 @@ switch ($action)
$obj_facturation->paiementLe($txtDatePaiement);
}
$redirection = 'affIndex.php?menu=validation';
$redirection = 'affIndex.php?menutpl=validation';
break;
case 'retour':
$redirection = 'affIndex.php?menu=facturation';
$redirection = 'affIndex.php?menutpl=facturation';
break;
@ -336,7 +336,7 @@ switch ($action)
if (! $error)
{
$db->commit();
$redirection = 'affIndex.php?menu=validation_ok&facid='.$id; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr
$redirection = 'affIndex.php?menutpl=validation_ok&facid='.$id; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr
}
else
{

View File

@ -634,7 +634,7 @@ else
$sql = "SELECT u.rowid, u.lastname as lastname, u.firstname, u.statut, u.login, u.admin, u.entity";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user";
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
$sql.= " WHERE u.statut = 1 AND u.entity IN (".getEntity('user',1).")";
if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup;
//if (GETPOST("usertodo","int",3) > 0) $sql.=" AND u.rowid = ".GETPOST("usertodo","int",3);
//print $sql;

View File

@ -118,8 +118,8 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td class="noborderbottom" rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button "></td>';
print '</tr>';
$i++;
}

View File

@ -765,8 +765,11 @@ if (empty($reshook))
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
$price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level];
if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level];
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{
if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level];
if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level];
}
}
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
{
@ -1394,7 +1397,7 @@ if ($action == 'create')
print '</td></tr>';
// Delivery delay
print '<tr><td>' . $langs->trans('AvailabilityPeriod') . '</td><td colspan="2">';
print '<tr class="fielddeliverydelay"><td>' . $langs->trans('AvailabilityPeriod') . '</td><td colspan="2">';
$form->selectAvailabilityDelay('', 'availability_id', '', 1);
print '</td></tr>';
@ -1869,7 +1872,7 @@ if ($action == 'create')
print '</tr>';
// Delivery delay
print '<tr><td>';
print '<tr class="fielddeliverydelay"><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('AvailabilityPeriod');
if (! empty($conf->commande->enabled))

View File

@ -2846,6 +2846,8 @@ class Propal extends CommonObject
*/
function getLinesArray()
{
// For other object, here we call fetch_lines. But fetch_lines does not exists on proposal
$sql = 'SELECT pt.rowid, pt.label as custom_label, pt.description, pt.fk_product, pt.fk_remise_except,';
$sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,';
$sql.= ' pt.total_ht, pt.total_tva, pt.total_ttc, pt.fk_product_fournisseur_price as fk_fournprice, pt.buy_price_ht as pa_ht, pt.special_code, pt.localtax1_tx, pt.localtax2_tx,';
@ -2875,9 +2877,11 @@ class Propal extends CommonObject
$this->lines[$i]->id = $obj->rowid; // for backward compatibility
$this->lines[$i]->rowid = $obj->rowid;
$this->lines[$i]->label = $obj->custom_label;
$this->lines[$i]->desc = $obj->description;
$this->lines[$i]->description = $obj->description;
$this->lines[$i]->fk_product = $obj->fk_product;
$this->lines[$i]->ref = $obj->ref;
$this->lines[$i]->product_ref = $obj->ref;
$this->lines[$i]->entity = $obj->entity; // Product entity
$this->lines[$i]->product_label = $obj->product_label;
$this->lines[$i]->product_desc = $obj->product_desc;

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
@ -681,7 +681,7 @@ if (empty($reshook))
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
if (empty($tva_tx)) $tva_npr=0;
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
@ -694,10 +694,11 @@ if (empty($reshook))
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
$price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level];
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
$tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level];
$tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level];
if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility
{
if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level];
if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level];
}
}
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
{
@ -1321,6 +1322,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$projectid = 0;
$remise_absolue = 0;
$currency_code = $conf->currency;
if (! empty($origin) && ! empty($originid)) {
@ -1333,7 +1335,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if ($element == 'project') {
$projectid = $originid;
if (!$cond_reglement_id) {
$cond_reglement_id = $soc->cond_reglement_id;
}
@ -1465,7 +1467,7 @@ if ($action == 'create' && $user->rights->commande->creer)
if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE))
{
print '<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
$("#socid").change(function() {
var socid = $(this).val();
// reload page
@ -1669,7 +1671,7 @@ if ($action == 'create' && $user->rights->commande->creer)
default:
$newclassname = $classname;
}
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
@ -2469,7 +2471,7 @@ if ($action == 'create' && $user->rights->commande->creer)
{
print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans("AddAction") . '</a>';
}
// Create intervention
if ($conf->ficheinter->enabled) {
$langs->load("interventions");
@ -2486,12 +2488,12 @@ if ($action == 'create' && $user->rights->commande->creer)
// Create contract
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
$langs->load("contracts");
if ($user->rights->contrat->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a></div>';
}
}
// Ship
$numshipping = 0;
if (! empty($conf->expedition->enabled)) {
@ -2558,6 +2560,11 @@ if ($action == 'create' && $user->rights->commande->creer)
print '</div>';
}
// Select mail models is same action as presend
if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action != 'presend')
{
print '<div class="fichecenter"><div class="fichehalfleft">';
@ -2605,6 +2612,7 @@ if ($action == 'create' && $user->rights->commande->creer)
$ref = dol_sanitizeFileName($object->ref);
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
$fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
$file = $fileparams['fullname'];
// Define output language
@ -2655,7 +2663,7 @@ if ($action == 'create' && $user->rights->commande->creer)
{
include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'ord'.$object->id);
}
}
$formmail->withfrom = 1;
$liste = array();
foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value)

View File

@ -1719,7 +1719,7 @@ class Commande extends CommonOrder
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)';
$sql.= ' WHERE l.fk_commande = '.$this->id;
if ($only_product) $sql .= ' AND p.fk_product_type = 0';
$sql .= ' ORDER BY l.rang';
$sql .= ' ORDER BY l.rang, l.rowid';
dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG);
$result = $this->db->query($sql);
@ -1740,6 +1740,7 @@ class Commande extends CommonOrder
$line->commande_id = $objp->fk_commande;
$line->label = $objp->custom_label;
$line->desc = $objp->description;
$line->description = $objp->description; // Description line
$line->product_type = $objp->product_type;
$line->qty = $objp->qty;
$line->tva_tx = $objp->tva_tx;
@ -2548,7 +2549,14 @@ class Commande extends CommonOrder
// Anciens indicateurs: $price, $subprice, $remise (a ne plus utiliser)
$price = $pu;
$subprice = $pu;
if ($price_base_type == 'TTC')
{
$subprice = $tabprice[5];
}
else
{
$subprice = $pu;
}
$remise = 0;
if ($remise_percent > 0)
{
@ -3276,12 +3284,14 @@ class Commande extends CommonOrder
}
/**
* Return an array of order lines
*
* @return array Lines of order
* Create an array of order lines
*
* @return int >0 if OK, <0 if KO
*/
function getLinesArray()
{
return $this->fetch_lines();
/*
$lines = array();
$sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, l.price, l.qty, l.tva_tx, ';
@ -3360,7 +3370,7 @@ class Commande extends CommonOrder
{
$this->error=$this->db->error();
return -1;
}
}*/
}
/**

View File

@ -64,6 +64,8 @@ if (dol_strlen($search_dt_start) > 0)
$param .= '&search_start_dtmonth=' . GETPOST('search_start_dtmonth', 'int') . '&search_start_dtday=' . GETPOST('search_start_dtday', 'int') . '&search_start_dtyear=' . GETPOST('search_start_dtyear', 'int');
if (dol_strlen($search_dt_end) > 0)
$param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int');
if (GETPOST("req_nb")) $param.='&amp;req_nb='.urlencode(GETPOST("req_nb"));
if (GETPOST("thirdparty")) $param.='&amp;thirdparty='.urlencode(GETPOST("thirdparty"));
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
@ -95,7 +97,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$companystatic=new Societe($db);
$bankaccountstatic=new Account($db);
llxHeader();
llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param);
$form = new Form($db);
$formother = new FormOther($db);
@ -118,12 +120,10 @@ $sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")";
if ($search_req_nb)
{
$sql.= " AND b.num_chq LIKE '%".$db->escape($search_req_nb)."%'";
$param.='&amp;req_nb='.urlencode($search_req_nb);
}
if ($search_thirdparty)
{
$sql.=" AND s.nom LIKE '%".$db->escape($search_thirdparty)."%'";
$param.='&amp;thirdparty='.urlencode($search_thirdparty);
}
if ($bid)
{
@ -225,16 +225,16 @@ if ($resql)
print '<td class="liste_titre" align="center">';
$form->select_types_paiements(empty($type)?'':$type, 'type', '', 2, 0, 1, 8);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat" name="req_nb" value="'.$search_req_nb.'" size="2"></td>';
print '<td class="liste_titre"><input type="text" class="flat" name="req_nb" value="'.dol_escape_htmltag($search_req_nb).'" size="2"></td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" name="description" size="10" value="'.$description.'">';
print '<input type="text" class="flat" name="description" size="10" value="'.dol_escape_htmltag($description).'">';
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat" name="thirdparty" value="'.$search_thirdparty.'" size="10"></td>';
print '<td class="liste_titre"><input type="text" class="flat" name="thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'" size="10"></td>';
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="debit" size="4" value="'.$debit.'">';
print '<input type="text" class="flat" name="debit" size="4" value="'.dol_escape_htmltag($debit).'">';
print '</td>';
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="credit" size="4" value="'.$credit.'">';
print '<input type="text" class="flat" name="credit" size="4" value="'.dol_escape_htmltag($credit).'">';
print '</td>';
print '<td></td>';
print '<td class="liste_titre" align="right">';

View File

@ -783,10 +783,17 @@ if (empty($reshook))
$facture_source = new Facture($db); // fetch origin object
if ($facture_source->fetch($object->fk_facture_source)>0)
{
$fk_parent_line = 0;
foreach($facture_source->lines as $line)
{
// Reset fk_parent_line for no child products and special product
if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) {
$fk_parent_line = 0;
}
$line->fk_facture = $object->id;
$line->fk_parent_line = $fk_parent_line;
$line->subprice =-$line->subprice; // invert price for object
$line->pa_ht = -$line->pa_ht;
@ -796,9 +803,14 @@ if (empty($reshook))
$line->total_localtax1=-$line->total_localtax1;
$line->total_localtax2=-$line->total_localtax2;
$line->insert();
$result = $line->insert();
$object->lines[] = $line; // insert new line in current object
// Defined the new fk_parent_line
if ($result > 0 && $line->product_type == 9) {
$fk_parent_line = $result;
}
}
$object->update_price(1);
@ -1594,7 +1606,7 @@ if (empty($reshook))
$line = new FactureLigne($db);
$line->fetch(GETPOST('lineid'));
$percent = $line->get_prev_progress();
$percent = $line->get_prev_progress($object->id);
if (GETPOST('progress') < $percent)
{
@ -1712,7 +1724,7 @@ if (empty($reshook))
{
foreach ($object->lines as $line)
{
$percent = $line->get_prev_progress();
$percent = $line->get_prev_progress($object->id);
if (GETPOST('all_progress') < $percent) {
$mesg = '<div class="warning">' . $langs->trans("CantBeLessThanMinPercent") . '</div>';
$result = -1;
@ -1911,7 +1923,7 @@ if ($action == 'create')
if ($element == 'project') {
$projectid = $originid;
if (!$cond_reglement_id) {
$cond_reglement_id = $soc->cond_reglement_id;
}
@ -1924,7 +1936,7 @@ if ($action == 'create')
if (!$dateinvoice) {
// Do not set 0 here (0 for a date is 1970)
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice);
}
}
} else {
// For compatibility
if ($element == 'order' || $element == 'commande') {
@ -2667,7 +2679,7 @@ else if ($id > 0 || ! empty($ref))
$qualified_for_stock_change = $object->hasProductsOrServices(1);
}
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut >= 1)
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change && $object->statut >= 1)
{
$langs->load("stocks");
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
@ -2858,7 +2870,7 @@ else if ($id > 0 || ! empty($ref))
}
// Clone confirmation
if ($action == 'clone')
if ($action == 'clone')
{
// Create an array for form
$formquestion = array(
@ -2869,7 +2881,7 @@ else if ($id > 0 || ! empty($ref))
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
}
if (! $formconfirm)
if (! $formconfirm)
{
$parameters = array('lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
@ -3818,14 +3830,14 @@ else if ($id > 0 || ! empty($ref))
// modified by hook
if (empty($reshook)) {
// Editer une facture deja validee, sans paiement effectue et pas exporte en compta
if ($object->statut == 1)
if ($object->statut == 1)
{
// On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees
$ventilExportCompta = $object->getVentilExportCompta();
if ($resteapayer == $object->total_ttc && empty($object->paye) && $ventilExportCompta == 0)
if ($resteapayer == $object->total_ttc && empty($object->paye) && $ventilExportCompta == 0)
{
if (! $objectidnext)
if (! $objectidnext && $object->is_last_in_cycle())
{
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer))
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate)))

View File

@ -1154,7 +1154,7 @@ class Facture extends CommonInvoice
$this->lines=array();
$sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, ';
$sql .= ' l.situation_percent, l.fk_prev_id,';
$sql.= ' l.situation_percent, l.fk_prev_id,';
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
$sql.= ' l.rang, l.special_code,';
$sql.= ' l.date_start as date_start, l.date_end as date_end,';
@ -1165,7 +1165,7 @@ class Facture extends CommonInvoice
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
$sql.= ' WHERE l.fk_facture = '.$this->id;
$sql.= ' ORDER BY l.rang';
$sql.= ' ORDER BY l.rang, l.rowid';
dol_syslog(get_class($this).'::fetch_lines', LOG_DEBUG);
$result = $this->db->query($sql);
@ -1182,7 +1182,9 @@ class Facture extends CommonInvoice
$line->rowid = $objp->rowid; // deprecated
$line->label = $objp->custom_label; // deprecated
$line->desc = $objp->description; // Description line
$line->description = $objp->description; // Description line
$line->product_type = $objp->product_type; // Type of line
$line->ref = $objp->product_ref; // Ref product
$line->product_ref = $objp->product_ref; // Ref product
$line->libelle = $objp->product_label; // TODO deprecated
$line->product_label = $objp->product_label; // Label product
@ -3678,6 +3680,8 @@ class Facture extends CommonInvoice
*/
function getLinesArray()
{
return $this->fetch_lines();
/*
$sql = 'SELECT l.rowid, l.label as custom_label, l.description, l.fk_product, l.product_type, l.qty, l.tva_tx,';
$sql.= ' l.fk_remise_except, l.localtax1_tx, l.localtax2_tx,';
$sql .= ' l.situation_percent, l.fk_prev_id,';
@ -3711,11 +3715,12 @@ class Facture extends CommonInvoice
$this->lines[$i]->description = $obj->description;
$this->lines[$i]->fk_product = $obj->fk_product;
$this->lines[$i]->ref = $obj->product_ref;
$this->lines[$i]->entity = $obj->entity; // Product entity
$this->lines[$i]->product_label = $obj->product_label;
$this->lines[$i]->product_ref = $obj->product_ref;
$this->lines[$i]->product_label = $obj->product_label;
$this->lines[$i]->product_desc = $obj->product_desc;
$this->lines[$i]->fk_product_type = $obj->fk_product_type;
$this->lines[$i]->product_type = $obj->product_type;
$this->lines[$i]->entity = $obj->entity; // Product entity
$this->lines[$i]->qty = $obj->qty;
$this->lines[$i]->subprice = $obj->subprice;
$this->lines[$i]->fk_remise_except = $obj->fk_remise_except;
@ -3725,6 +3730,10 @@ class Facture extends CommonInvoice
$this->lines[$i]->total_ht = $obj->total_ht;
$this->lines[$i]->total_tva = $obj->total_tva;
$this->lines[$i]->total_ttc = $obj->total_ttc;
$this->lines[$i]->localtax1_tx = $obj->localtax1_tx;
$this->lines[$i]->localtax2_tx = $obj->localtax2_tx;
$this->lines[$i]->localtax1_type = $obj->localtax1_type;
$this->lines[$i]->localtax2_type = $obj->localtax2_type;
$this->lines[$i]->fk_parent_line = $obj->fk_parent_line;
$this->lines[$i]->situation_percent = $obj->situation_percent;
$this->lines[$i]->fk_prev_id = $obj->fk_prev_id;
@ -3757,7 +3766,7 @@ class Facture extends CommonInvoice
{
$this->error=$this->db->error();
return -1;
}
}*/
}
/**
@ -4533,15 +4542,22 @@ class FactureLigne extends CommonInvoiceLine
}
/**
* Returns situation_percent of the previous line
* Returns situation_percent of the previous line.
* Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line.
*
* @return int >= 0
* @param int $invoiceid Invoice id
* @return int >= 0
*/
function get_prev_progress()
function get_prev_progress($invoiceid)
{
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {
return 0;
} else {
// If invoice is a not a situation invoice, this->fk_prev_id is used for something else
$tmpinvoice=new Facture($this->db);
$tmpinvoice->fetch($invoiceid);
if ($tmpinvoice->type != Facture::TYPE_SITUATION) return 0;
$sql = 'SELECT situation_percent FROM ' . MAIN_DB_PREFIX . 'facturedet WHERE rowid=' . $this->fk_prev_id;
$resql = $this->db->query($sql);
if ($resql && $resql->num_rows > 0) {

View File

@ -454,7 +454,7 @@ if ($object->id > 0)
/*
* Withdrawal request
* Withdrawal opened requests
*/
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande as date_demande";
@ -564,6 +564,8 @@ if ($object->id > 0)
dol_print_error($db);
}
// Closed requests
$sql = "SELECT pfd.rowid, pfd.traite, pfd.date_demande,";
$sql.= " pfd.date_traite, pfd.fk_prelevement_bons, pfd.amount,";
$sql.= " pb.ref,";

View File

@ -97,7 +97,7 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="18"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;

View File

@ -116,7 +116,7 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat" name="'.$key.'" id="'.$key.'" size="14"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;

View File

@ -166,14 +166,15 @@ if ($result)
// Situation invoices handling
$line = new FactureLigne($db);
$line->fetch($obj->id);
$prev_progress = $line->get_prev_progress();
$line->fetch($obj->id); // id of line
$prev_progress = 0;
if ($obj->type==Facture::TYPE_SITUATION) {
// Avoid divide by 0
if ($obj->situation_percent == 0) {
$situation_ratio = 0;
} else {
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
$prev_progress = $line->get_prev_progress($obj->rowid); // id on invoice
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
}
} else {
$situation_ratio = 1;

View File

@ -71,7 +71,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
$tva->datev=$datev;
$tva->datep=$datep;
$amount = GETPOST("amount");
$amount = price2num(GETPOST("amount"));
if ($refund == 1) {
$amount= -$amount;
}
@ -234,11 +234,11 @@ if ($action == 'create')
print "<tr>";
print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
print $form->select_date($datep,"datep",'','','','add');
print $form->select_date($datep,"datep",'','','','add',1,1);
print '</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
print $form->select_date($datev,"datev",'','','','add');
print $form->select_date($datev,"datev",'','','','add',1,1);
print '</td></tr>';
// Label

View File

@ -126,7 +126,7 @@ $fieldstosearchall = array(
// Definition of fields for list
$arrayfields=array(
'p.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1),
'p.firstname'=>array('label'=>$langs->trans("Firsname"), 'checked'=>1),
'p.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1),
'p.poste'=>array('label'=>$langs->trans("Post"), 'checked'=>1),
'p.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0),
'p.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0),
@ -211,7 +211,7 @@ $sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.zip,
$sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,";
$sql.= " co.code as country_code";
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook

View File

@ -41,10 +41,16 @@ if ($action == 'add')
{
$error++;
$langs->load("errors");
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"));
$action = 'create';
}
if (GETPOST('type')=='varchar' && $extrasize <= 0)
{
$error++;
$langs->load("errors");
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Size"));
$action = 'edit';
}
if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring)
{
$error++;
@ -203,8 +209,15 @@ if ($action == 'update')
{
$error++;
$langs->load("errors");
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
$action = 'create';
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type"));
$action = 'edit';
}
if (GETPOST('type')=='varchar' && $extrasize <= 0)
{
$error++;
$langs->load("errors");
$mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Size"));
$action = 'edit';
}
if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring)
{

View File

@ -122,6 +122,8 @@ if (! empty($conf->hrm->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_EMPLO
*/
// Execute hook addSearchEntry
$hookmanager->initHooks(array('searchform','leftblock'));
$parameters=array();
$reshook=$hookmanager->executeHooks('addSearchEntry',$parameters);
if (empty($reshook))
@ -132,12 +134,6 @@ else $arrayresult=$hookmanager->resArray;
print json_encode($arrayresult);
if (is_object($db)) $db->close();

View File

@ -51,7 +51,7 @@ abstract class CommonObjectLine extends CommonObject
/**
* Returns the text label from units dictionnary
* Returns the text label from units dictionary
*
* @param string $type Label type (long or short)
* @return string|int <0 if ko, label if ok

View File

@ -4055,7 +4055,7 @@ class Form
/**
* Load into the cache vat rates of a country
*
* @param string $country_code Country code
* @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
*/
function load_cache_vatrates($country_code)
@ -5136,8 +5136,11 @@ class Form
else if ($objecttype == 'order_supplier') {
$tplpath = 'fourn/commande';
}
global $linkedObjectBlock;
else if ($objecttype == 'expensereport') {
$tplpath = 'expensereport';
}
global $linkedObjectBlock;
$linkedObjectBlock = $objects;
// Output template part (modules that overwrite templates must declare this into descriptor)

View File

@ -238,6 +238,7 @@ class Notify
'ORDER_VALIDATE',
'PROPAL_VALIDATE',
'FICHINTER_VALIDATE',
'FICHINTER_ADD_CONTACT',
'ORDER_SUPPLIER_VALIDATE',
'ORDER_SUPPLIER_APPROVE',
'ORDER_SUPPLIER_REFUSE',
@ -315,6 +316,12 @@ class Notify
$object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
break;
case 'FICHINTER_ADD_CONTACT':
$link='/fichinter/card.php?id='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'ficheinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$object->ref);
break;
case 'FICHINTER_VALIDATE':
$link='/fichinter/card.php?id='.$object->id;
$dir_output = $conf->facture->dir_output;
@ -427,7 +434,7 @@ class Notify
if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue;
$threshold = (float) $reg[1];
if ($object->total_ht <= $threshold)
if (!empty($object->total_ht) && $object->total_ht <= $threshold)
{
dol_syslog("A notification is requested for notifcode = ".$notifcode." but amount = ".$object->total_ht." so lower than threshold = ".$threshold.". We discard this notification");
continue;
@ -468,6 +475,12 @@ class Notify
$object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref);
break;
case 'FICHINTER_ADD_CONTACT':
$link='/fichinter/card.php?id='.$object->id;
$dir_output = $conf->facture->dir_output;
$object_type = 'ficheinter';
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$newref);
break;
case 'FICHINTER_VALIDATE':
$link='/fichinter/card.php?id='.$object->id;
$dir_output = $conf->facture->dir_output;

View File

@ -3,6 +3,7 @@
* Copyright (C) Walter Torres <walter@torres.ws> [with a *lot* of help!]
* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2011 Regis Houssin
* Copyright (C) 2016 Jonathan TISSEAU <jonathan.tisseau@86dev.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -387,6 +388,8 @@ class SMTPs
*/
function _server_authenticate()
{
global $conf;
// Send the RFC2554 specified EHLO.
// This improvment as provided by 'SirSir' to
// accomodate both SMTP AND ESMTP capable servers
@ -395,6 +398,24 @@ class SMTPs
$host=preg_replace('@ssl://@i','',$host); // Remove prefix
if ( $_retVal = $this->socket_send_str('EHLO ' . $host, '250') )
{
if (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS))
{
if (!$_retVal = $this->socket_send_str('STARTTLS', 220))
{
$this->_setErr(131, 'STARTTLS connection is not supported.');
return $_retVal;
}
if (!stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT))
{
$this->_setErr(132, 'STARTTLS connection failed.');
return $_retVal;
}
if (!$_retVal = $this->socket_send_str('EHLO '.$host, '250'))
{
$this->_setErr(126, '"' . $host . '" does not support authenticated connections.');
return $_retVal;
}
}
// Send Authentication to Server
// Check for errors along the way
$this->socket_send_str('AUTH LOGIN', '334');

View File

@ -3642,20 +3642,52 @@ function get_localtax_by_third($local)
}
/**
* Get vat rate and npr from id.
* You can call getLocalTaxesFromRate after to get other fields
*
* @param string $vatrate VAT Rate. Value can be value or the string with code into parenthesis or rowid if $firstparamisid is 1. Example: '8.5' or '8.5 (8.5NPR)' or 123.
* @param int $usenpr Use npr
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
*/
function getTaxesFromId($vatrowid)
{
global $db, $mysoc;
dol_syslog("getTaxesFromId vatrowid=".$vatrowid);
// Search local taxes
$sql = "SELECT t.rowid, t.code, t.taux as rate, t.recuperableonly as npr";
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t";
$sql.= " WHERE t.rowid ='".$vatrowid."'";
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
return array('rowid'=>$obj->rowid, 'code'=>$obj->code, 'rate'=>$obj->rate, 'npr'=>$obj->npr);
}
else dol_print_error($db);
return array();
}
/**
* Get type and rate of localtaxes for a particular vat rate/country fo thirdparty
* TODO
* This function is also called to retrieve type for building PDF. Such call of function must be removed.
* This function is ALSO called to retrieve type for building PDF. Such call of function must be removed.
* Instead this function must be called when adding a line to get the array of localtax and type, and then
* provide it to the function calcul_price_total.
*
* @param float $vatrate VAT Rate. Value can be '8.5' or '8.5 (8.5NPR)'.
* @param string $vatrate VAT Rate. Value can be value or the string with code into parenthesis or rowid if $firstparamisid is 1. Example: '8.5' or '8.5 (8.5NPR)' or 123.
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
* @param Societe $buyer Company object
* @param Societe $seller Company object
* @param int $firstparamisid 1 if first param is id into table (use this if you can)
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
*/
function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid=0)
{
global $db, $mysoc;
@ -3670,12 +3702,17 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
// Search local taxes
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type, t.accountancy_code_sell, t.accountancy_code_buy";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
if ($mysoc->country_code == 'ES') $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$buyer->country_code."'";
else $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$seller->country_code."'";
$sql .= " AND t.taux = ".((float) $vatratecleaned)." AND t.active = 1";
if ($vatratecode) $sql.= " AND t.code ='".$vatratecode."'";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t";
if ($firstparamisid) $sql.= " WHERE t.rowid ='".$vatrate."'";
else
{
$sql.=", ".MAIN_DB_PREFIX."c_country as c";
if ($mysoc->country_code == 'ES') $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$buyer->country_code."'"; // local tax in spain use the buyer country ??
else $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$seller->country_code."'";
$sql.= " AND t.taux = ".((float) $vatratecleaned)." AND t.active = 1";
if ($vatratecode) $sql.= " AND t.code ='".$vatratecode."'";
}
$resql=$db->query($sql);
if ($resql)
{
@ -4698,7 +4735,7 @@ function setEventMessage($mesgs, $style='mesgs')
*/
function setEventMessages($mesg, $mesgs, $style='mesgs')
{
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter for setEventMessage');
if (! in_array((string) $style, array('mesgs','warnings','errors'))) dol_print_error('','Bad parameter style='.$style.' for setEventMessages');
if (empty($mesgs)) setEventMessage($mesg, $style);
else
{
@ -5471,14 +5508,36 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
$newres .= ($i2 > 0 ? ' OR ' : '') . $field . " IN (" . $db->escape(trim($crit)) . ")";
$i2++; // a criteria was added to string
}
else
else // $mode=0
{
$textcrit = '';
$tmpcrits = explode('|',$crit);
$i3 = 0;
foreach($tmpcrits as $tmpcrit)
{
$newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($tmpcrit)) . "%'";
$newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '') . $field . " LIKE '";
$tmpcrit=trim($tmpcrit);
$tmpcrit2=$tmpcrit;
$tmpbefore='%'; $tmpafter='%';
if (preg_match('/^[\^\$]/', $tmpcrit))
{
$tmpbefore='';
$tmpcrit2 = preg_replace('/^[\^\$]/', '', $tmpcrit2);
}
if (preg_match('/[\^\$]$/', $tmpcrit))
{
$tmpafter='';
$tmpcrit2 = preg_replace('/[\^\$]$/', '', $tmpcrit2);
}
$newres .= $tmpbefore;
$newres .= $db->escape($tmpcrit2);
$newres .= $tmpafter;
$newres .= "'";
if (empty($tmpcrit2))
{
$newres .= ' OR ' . $field . " IS NULL";
}
$i3++;
}
$i2++; // a criteria was added to string

View File

@ -64,8 +64,20 @@ function facture_prepare_head($object)
//if ($fac->mode_reglement_code == 'PRE')
if (! empty($conf->prelevement->enabled))
{
$nbStandingOrders=0;
$sql = "SELECT COUNT(pfd.rowid) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
$sql .= " WHERE pfd.fk_facture = ".$object->id;
$resql=$db->query($sql);
if ($resql)
{
$obj=$db->fetch_object($resql);
if ($obj) $nbStandingOrders = $obj->nb;
}
else dol_print_error($db);
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
$head[$h][1] = $langs->trans('StandingOrders');
if ($nbStandingOrders > 0) $head[$h][1].= ' <span class="badge">'.$nbStandingOrders.'</span>';
$head[$h][2] = 'standingorders';
$h++;
}

View File

@ -1220,7 +1220,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/holiday/card.php?&action=request", $langs->trans("New"), 1,$user->rights->holiday->write);
$newmenu->add("/holiday/list.php?&leftmenu=hrm", $langs->trans("List"), 1,$user->rights->holiday->read);
$newmenu->add("/holiday/list.php?select_statut=2&leftmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->holiday->read);
$newmenu->add("/holiday/define_holiday.php?&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->define_holiday);
$newmenu->add("/holiday/define_holiday.php?&action=request", $langs->trans("MenuConfCP"), 1, $user->rights->holiday->read);
$newmenu->add("/holiday/view_log.php?&action=request", $langs->trans("MenuLogCP"), 1, $user->rights->holiday->define_holiday);
}

View File

@ -44,6 +44,16 @@ class DolibarrModules // Can not be abstract, because we need to insta
*/
public $numero;
/**
* @var string Publisher name
*/
public $editor_name;
/**
* @var string URL of module at publisher site
*/
public $editor_web;
/**
* @var string Family
*/
@ -153,10 +163,15 @@ class DolibarrModules // Can not be abstract, because we need to insta
public $version;
/**
* @var string Module description
* @var string Module description (short text)
*/
public $description;
/**
* @var string Module description (long text)
*/
public $descriptionlong;
/**
* @var string[] Module language files
*/
@ -444,7 +459,47 @@ class DolibarrModules // Can not be abstract, because we need to insta
}
}
/**
* Gives the translated module description if translation exists in admin.lang or the default module description
*
* @return string Translated module description
*/
function getDescLong()
{
global $langs;
$langs->load("admin");
// If module description translation does not exist using its unique id, we can use its name to find translation
if (is_array($this->langfiles))
{
foreach($this->langfiles as $val)
{
if ($val) $langs->load($val);
}
}
return $langs->trans($this->descriptionlong);
}
/**
* Gives the publisher name
*
* @return string Publisher name
*/
function getPublisher()
{
return $this->editor_name;
}
/**
* Gives the publisher url
*
* @return string Publisher url
*/
function getPublisherUrl()
{
return $this->editor_url;
}
/**
* Gives module version
* For 'experimental' modules, gives 'experimental' translation

View File

@ -227,7 +227,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
* Return if a code is used (by other element)
*
* @param DoliDB $db Handler acces base
* @param string $code Code a verifier
* @param string $code Code to check
* @param Product $product Objet product
* @return int 0 if available, <0 if KO
*/
@ -277,12 +277,20 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
return '';
}
dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest);
$newcodefortest=$codefortest;
// Special case, if mask is on 12 digits instead of 13, we remove last char into code to test
if (in_array($typefortest,array('EAN13','ISBN'))) // We remove the CRC char not included into mask
{
$newcodefortest=substr($newcodefortest,0,12);
if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i',$mask,$reg))
{
if (strlen($reg[1]) == 12) $newcodefortest=substr($newcodefortest,0,12);
dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest);
}
}
$result=check_value($mask,$newcodefortest);
return $result;

View File

@ -913,7 +913,7 @@ class pdf_einstein extends ModelePDFCommandes
// VAT
foreach($this->tva as $tvakey => $tvaval)
{
if ($tvakey > 0) // On affiche pas taux 0
if ($tvakey != 0) // On affiche pas taux 0
{
$this->atleastoneratenotnull++;

View File

@ -57,7 +57,6 @@ class pdf_proforma extends pdf_einstein
}
/**
* Show top header of page.
*

View File

@ -166,7 +166,7 @@ class pdf_crabe extends ModelePDFFactures
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
@ -539,7 +539,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
$prev_progress = $object->lines[$i]->get_prev_progress();
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
if ($prev_progress > 0) // Compute progress from previous situation
{
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent;
@ -548,6 +548,7 @@ class pdf_crabe extends ModelePDFFactures
if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne=$object->lines[$i]->multicurrency_total_tva;
else $tvaligne=$object->lines[$i]->total_tva;
}
$localtax1ligne=$object->lines[$i]->total_localtax1;
$localtax2ligne=$object->lines[$i]->total_localtax2;
$localtax1_rate=$object->lines[$i]->localtax1_tx;
@ -1106,11 +1107,12 @@ class pdf_crabe extends ModelePDFFactures
}
}
}
//}
//}
// VAT
foreach($this->tva as $tvakey => $tvaval)
{
if ($tvakey > 0) // On affiche pas taux 0
if ($tvakey != 0) // On affiche pas taux 0
{
$this->atleastoneratenotnull++;

View File

@ -91,7 +91,7 @@ class modIncoterm extends DolibarrModules
'tablib'=>array("Incoterms"), // Label of tables
'tabsql'=>array('SELECT rowid, code, libelle, active FROM '.MAIN_DB_PREFIX.'c_incoterms'), // Request to select fields
'tabsqlsort'=>array("rowid ASC"), // Sort order
'tabfield'=>array("code,libelle"), // List of fields (result of select to show dictionnary)
'tabfield'=>array("code,libelle"), // List of fields (result of select to show dictionary)
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')

View File

@ -1075,7 +1075,7 @@ class pdf_azur extends ModelePDFPropales
// VAT
foreach($this->tva as $tvakey => $tvaval)
{
if ($tvakey > 0) // On affiche pas taux 0
if ($tvakey != 0) // On affiche pas taux 0
{
$this->atleastoneratenotnull++;

View File

@ -30,6 +30,7 @@
jQuery(document).ready(function() {
function init_typeoffields(type)
{
console.log("select new type "+type);
var size = jQuery("#size");
var unique = jQuery("#unique");
var required = jQuery("#required");
@ -92,23 +93,21 @@
<tr><td><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo GETPOST('pos'); ?>"></td></tr>
<!-- Default Value (for select list / radio/ checkbox) -->
<tr id="value_choice">
<td>
<?php echo $langs->trans("Value"); ?>
</td>
<td>
<table class="nobordernopadding">
<tr><td>
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo GETPOST('param'); ?></textarea>
</td><td>
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?></span>
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?></span>
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?></span>
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?></span>
</td></tr>
</table>
<table class="nobordernopadding">
<tr><td>
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo GETPOST('param'); ?></textarea>
</td><td>
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?></span>
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?></span>
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?></span>
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?></span>
</td></tr>
</table>
</td>
</tr>
<!-- Default Value -->
<tr><td><?php echo $langs->trans("DefaultValue"); ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo (GETPOST('"default_value"')?GETPOST('"default_value"'):''); ?>"></td></tr>

View File

@ -22,20 +22,45 @@
jQuery(document).ready(function() {
function init_typeoffields(type)
{
console.log("select new type "+type);
var size = jQuery("#size");
var unique = jQuery("#unique");
var required = jQuery("#required");
if (type == 'date') { size.prop('disabled', true); }
else if (type == 'datetime') { size.prop('disabled', true); }
else if (type == 'double') { size.removeAttr('disabled'); }
else if (type == 'int') { size.removeAttr('disabled'); }
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); }
else if (type == 'varchar') { size.removeAttr('disabled'); }
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true);}
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true);}
var default_value = jQuery("#default_value");
<?php
if((GETPOST('type') != "select") && (GETPOST('type') != "sellist"))
{
print 'jQuery("#value_choice").hide();';
}
if (GETPOST('type') == "separate")
{
print "jQuery('#size, #unique, #required, #default_value').val('').prop('disabled', true);";
print 'jQuery("#value_choice").hide();';
}
?>
if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); }
else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();}
else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();}
else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();}
else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();}
else size.val('').prop('disabled', true);
}
init_typeoffields(jQuery("#type").val());
jQuery("#type").change(function() {
init_typeoffields($(this).val());
});
});
</script>
@ -85,33 +110,56 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') )
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
<!-- Type -->
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
<?php print $type2label[$type]; ?>
<input type="hidden" name="type" id="type" value="<?php print $type; ?>">
<?php
// Define list of possible type transition
$typewecanchangeinto=array(
'varchar'=>array('varchar', 'phone', 'mail', 'select'),
'mail'=>array('varchar', 'phone', 'mail', 'select'),
'phone'=>array('varchar', 'phone', 'mail', 'select'),
'select'=>array('varchar', 'phone', 'mail', 'select')
);
if (in_array($type, array_keys($typewecanchangeinto)))
{
$newarray=array();
print '<select id="type" class="flat type" name="type">';
foreach($type2label as $key => $val)
{
$selected='';
if ($key == (GETPOST('type')?GETPOST('type'):$type)) $selected=' selected="selected"';
if (in_array($key, $typewecanchangeinto[$type])) print '<option value="'.$key.'"'.$selected.'>'.$val.'</option>';
else print '<option value="'.$key.'" disabled="disabled"'.$selected.'>'.$val.'</option>';
}
print '</select>';
}
else
{
print $type2label[$type];
print '<input type="hidden" name="type" id="type" value="'.$type.'">';
}
?>
</td></tr>
<!-- Size -->
<tr><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" size="5" value="<?php echo $size; ?>"></td></tr>
<!-- Position -->
<tr><td><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo $extrafields->attribute_pos[$attrname]; ?>"></td></tr>
<!-- Value (for select list / radio) -->
<?php
if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') || ($type == 'chkbxlst') || ($type == 'radio') || ($type == 'link'))
{
?>
<tr id="value_choice">
<td>
<?php echo $langs->trans("Value"); ?>
</td>
<td>
<table class="nobordernopadding">
<tr><td>
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
</td><td><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelp".$type),1,0)?></td></tr>
</table>
<table class="nobordernopadding">
<tr><td>
<textarea name="param" id="param" cols="80" rows="<?php echo ROWS_4 ?>"><?php echo dol_htmlcleanlastbr($param_chain); ?></textarea>
</td><td>
<span id="helpselect"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?></span>
<span id="helpsellist"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?></span>
<span id="helpchkbxlst"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?></span>
<span id="helplink"><?php print $form->textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?></span>
</td></tr>
</table>
</td>
</tr>
<?php
}
?>
<!-- Unique -->
<tr><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique" <?php echo ($unique?' checked':''); ?>></td></tr>
<!-- Required -->

View File

@ -41,6 +41,7 @@ class InterfaceNotification extends DolibarrTriggers
'ORDER_VALIDATE',
'PROPAL_VALIDATE',
'FICHINTER_VALIDATE',
'FICHINTER_ADD_CONTACT',
'ORDER_SUPPLIER_VALIDATE',
'ORDER_SUPPLIER_APPROVE',
'ORDER_SUPPLIER_REFUSE',

View File

View File

@ -0,0 +1,75 @@
<?php
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
?>
<!-- BEGIN PHP TEMPLATE -->
<?php
global $user;
$langs = $GLOBALS['langs'];
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("expensereports");
echo '<br>';
print_titre($langs->trans("RelatedExpenseReports"));
?>
<table class="noborder allwidth">
<tr class="liste_titre">
<td><?php echo $langs->trans("Ref"); ?></td>
<td align="center"><?php echo $langs->trans("Date"); ?></td>
<td align="right"><?php echo $langs->trans("AmountHTShort"); ?></td>
<td align="right"><?php echo $langs->trans("Status"); ?></td>
<td></td>
</tr>
<?php
$var=true;
$total=0;
foreach($linkedObjectBlock as $key => $objectlink)
{
$var=!$var;
?>
<tr <?php echo $GLOBALS['bc'][$var]; ?> >
<td><?php echo $objectlink->getNomUrl(1); ?></td>
<td align="center"><?php echo dol_print_date($objectlink->date_debut,'day'); ?></td>
<td align="right"><?php
if ($user->rights->expensereport->lire) {
$total = $total + $objectlink->total_ht;
echo price($objectlink->total_ht);
} ?></td>
<td align="right"><?php echo $objectlink->getLibStatut(3); ?></td>
<td align="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a></td>
</tr>
<?php
}
?>
<tr class="liste_total">
<td align="left" colspan="3"><?php echo $langs->trans("TotalHT"); ?></td>
<td align="right"><?php
if ($user->rights->expensereport->lire) {
echo price($total);
} ?></td>
<td></td>
<td></td>
</tr>
</table>
<!-- END PHP TEMPLATE -->

View File

@ -5,8 +5,8 @@
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-2015 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com>
* Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com>
* Copyright (C) 2015-2016 Abbes Bahfir <bafbes@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -478,12 +478,12 @@ if (empty($reshook))
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'</div>';
$error++;
}
if (!GETPOST('durationhour','int') && !GETPOST('durationmin','int'))
if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && !GETPOST('durationhour','int') && !GETPOST('durationmin','int'))
{
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Duration")).'</div>';
$error++;
}
if (GETPOST('durationhour','int') >= 24 && GETPOST('durationmin','int') > 0)
if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && GETPOST('durationhour','int') >= 24 && GETPOST('durationmin','int') > 0)
{
$mesg='<div class="error">'.$langs->trans("ErrorValueTooHigh").'</div>';
$error++;
@ -494,7 +494,7 @@ if (empty($reshook))
$desc=GETPOST('np_desc');
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
$duration = empty($conf->global->FICHINTER_WITHOUT_DURATION)?0:convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
// Extrafields
@ -1457,7 +1457,7 @@ else if ($id > 0 || ! empty($ref))
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Description').'</td>';
print '<td align="center">'.$langs->trans('Date').'</td>';
print '<td align="right">'.$langs->trans('Duration').'</td>';
print '<td align="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
print '<td width="48" colspan="3">&nbsp;</td>';
print "</tr>\n";
}
@ -1479,7 +1479,7 @@ else if ($id > 0 || ! empty($ref))
print '<td align="center" width="150">'.dol_print_date($db->jdate($objp->date_intervention),'dayhour').'</td>';
// Duration
print '<td align="right" width="150">'.convertSecondToTime($objp->duree).'</td>';
print '<td align="right" width="150">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertSecondToTime($objp->duree):'').'</td>';
print "</td>\n";
@ -1551,15 +1551,18 @@ else if ($id > 0 || ! empty($ref))
print '<td align="center" class="nowrap">';
$form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention");
print '</td>';
// Duration
print '<td align="right">';
if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) {
$selectmode = 'select';
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION))
$selectmode = 'text';
$form->select_duration('duration', $objp->duree, $selectmode);
}
print '</td>';
// Duration
print '<td align="right">';
$selectmode='select';
if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text';
$form->select_duration('duration',$objp->duree,0, $selectmode);
print '</td>';
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
print '</tr>' . "\n";
@ -1590,7 +1593,7 @@ else if ($id > 0 || ! empty($ref))
print '<a name="add"></a>'; // ancre
print $langs->trans('Description').'</td>';
print '<td align="center">'.$langs->trans('Date').'</td>';
print '<td align="right">'.$langs->trans('Duration').'</td>';
print '<td align="right">'.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'</td>';
print '<td colspan="4">&nbsp;</td>';
print "</tr>\n";
@ -1616,14 +1619,17 @@ else if ($id > 0 || ! empty($ref))
$form->select_date($timewithnohour,'di',1,1,0,"addinter");
print '</td>';
// Duration
print '<td align="right">';
$selectmode='select';
if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text';
$form->select_duration('duration', (!GETPOST('durationhour','int') && !GETPOST('durationmin','int'))?3600:(60*60*GETPOST('durationhour','int')+60*GETPOST('durationmin','int')), 0, $selectmode);
print '</td>';
// Duration
print '<td align="right">';
if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) {
$selectmode = 'select';
if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION))
$selectmode = 'text';
$form->select_duration('duration', (!GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) ? 3600 : (60 * 60 * GETPOST('durationhour', 'int') + 60 * GETPOST('durationmin', 'int')), 0, $selectmode);
}
print '</td>';
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
print '</tr>';
//Line extrafield

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2007-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Regis Houssin <regis.houssin@capnetworks.com>
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
if ($user->societe_id > 0) accessforbidden();
// If the user does not have perm to read the page
if(!$user->rights->holiday->define_holiday) accessforbidden();
if(!$user->rights->holiday->read) accessforbidden();
$action=GETPOST('action');
@ -214,6 +214,16 @@ if (count($typeleaves) == 0)
}
else
{
$canedit=0;
if (! empty($user->rights->holiday->define_holiday)) $canedit=1;
// Get array of ids of all childs
$userchilds=array();
if (empty($user->rights->holiday->read_all))
{
$userchilds=$user->getAllChildIds();
}
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
print '<input type="hidden" name="action" value="update" />';
@ -231,15 +241,22 @@ else
{
print '<td>'.$langs->trans("NoLeaveWithCounterDefined").'</td>';
}
print '<td width="20%" style="text-align:center">'.$langs->trans('Note').'</td>';
print '<td width="20%" style="text-align:center">';
if ($canedit) print $langs->trans('Note');
print '</td>';
print '<td></td>';
print '</tr>';
foreach($listUsers as $users)
{
$var=!$var;
// If user has not permission to edit/read all, we must see only subordinates
if (empty($user->rights->holiday->read_all))
{
if (($users['rowid'] != $user->id) && (! in_array($users['rowid'], $userchilds))) continue; // This user is not into hierarchy of current user, we hide it.
}
print '<tr '.$bc[$var].' style="height: 20px;">';
print '<td>';
$userstatic->id=$users['rowid'];
@ -255,7 +272,8 @@ else
$nbtoshow='';
if ($holiday->getCPforUser($users['rowid'], $val['rowid']) != '') $nbtoshow=price2num($holiday->getCPforUser($users['rowid'], $val['rowid']), 5);
print '<td style="text-align:center">';
print '<input type="text" value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>';
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' value="'.$nbtoshow.'" name="nb_holiday_'.$val['rowid'].'['.$users['rowid'].']" size="5" style="text-align: center;"/>';
else print $nbtoshow;
//print ' '.$langs->trans('days');
print '</td>'."\n";
}
@ -264,8 +282,15 @@ else
{
print '<td></td>';
}
print '<td style="text-align:center"><input type="text" value="" name="note_holiday['.$users['rowid'].']" size="30"/></td>';
print '<td><input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/></td>'."\n";
print '<td style="text-align:center">';
if ($canedit) print '<input type="text"'.($canedit?'':' disabled="disabled"').' value="" name="note_holiday['.$users['rowid'].']" size="30"/>';
print '</td>';
print '<td>';
if (! empty($user->rights->holiday->define_holiday))
{
print '<input type="submit" name="update_cp['.$users['rowid'].']" value="'.dol_escape_htmltag($langs->trans("Update")).'" class="button"/>';
}
print '</td>'."\n";
print '</tr>';
$i++;

0
htdocs/includes/ccampbell/chromephp/ChromePhp.php Executable file → Normal file
View File

View File

View File

View File

@ -541,7 +541,7 @@ foreach($valid_dashboardlines as $board)
if ($showweather)
{
$boxwork.='<td class="nohover hideonsmartphone" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
$boxwork.='<td class="nohover hideonsmartphone noborderbottom" rowspan="'.$rowspan.'" width="80" style="border-left: 1px solid #DDDDDD" align="center">';
$text='';
if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate).')';
$options='height="64px"';

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Метод за изпращане на имейли
MAIN_MAIL_SMTPS_ID=SMTP ID, ако разпознаване, изискван
MAIN_MAIL_SMTPS_PW=SMTP парола, ако разпознаване, изискван
MAIN_MAIL_EMAIL_TLS= Използване на TLS (SSL) криптиране
MAIN_MAIL_EMAIL_STARTTLS= Използване на TLS (STARTTLS) криптиране
MAIN_DISABLE_ALL_SMS=Изключване на всички SMS sendings (за тестови цели или демонстрации)
MAIN_SMS_SENDMODE=Метод за изпращане на SMS
MAIN_MAIL_SMS_FROM=Номер по подразбиране на телефона за изпращане на SMS

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails
MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required
MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required
MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt
MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails
MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required
MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required
MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt
MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Mètode d'enviament d'e-mails
MAIN_MAIL_SMTPS_ID=ID d'autenticació SMTP si es requereix autenticació SMTP
MAIN_MAIL_SMTPS_PW=Contrasenya autentificació SMTP si es requereix autenticació SMTP
MAIN_MAIL_EMAIL_TLS= Ús d'encriptació TLS (SSL)
MAIN_MAIL_EMAIL_STARTTLS= Ús d'encriptació TLS (STARTTLS)
MAIN_DISABLE_ALL_SMS=Desactivar globalment tot enviament de SMS (per mode de proves o demo)
MAIN_SMS_SENDMODE=Mètode d'enviament de SMS
MAIN_MAIL_SMS_FROM=Número de telèfon per defecte per als enviaments SMS

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metoda odesílání e-mailů
MAIN_MAIL_SMTPS_ID=SMTP ID je-li vyžadováno ověření
MAIN_MAIL_SMTPS_PW=SMTP heslo je-li vyžadováno ověření
MAIN_MAIL_EMAIL_TLS= Použít TLS (SSL) šifrování
MAIN_MAIL_EMAIL_STARTTLS= Použít TLS (STARTTLS) šifrování
MAIN_DISABLE_ALL_SMS=Zakázat všechny odesílané SMS (pro testovací účely apod.)
MAIN_SMS_SENDMODE=Použitá metoda pro odesílání SMS
MAIN_MAIL_SMS_FROM=Výchozí telefonní číslo odesílatele SMS

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode til at bruge til at sende e-mails
MAIN_MAIL_SMTPS_ID=SMTP ID hvis påkrævet
MAIN_MAIL_SMTPS_PW=SMTP Password hvis påkrævet
MAIN_MAIL_EMAIL_TLS= Brug TLS (SSL) kryptering
MAIN_MAIL_EMAIL_STARTTLS= Brug TLS (STARTTLS) kryptering
MAIN_DISABLE_ALL_SMS=Deaktiver alle SMS sendings (til testformål eller demoer)
MAIN_SMS_SENDMODE=Metode til at bruge til at sende SMS
MAIN_MAIL_SMS_FROM=Standard afsenderens telefonnummer til afsendelse af SMS'er

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Methode zum Senden von E-Mails
MAIN_MAIL_SMTPS_ID=SMTP ID, wenn Authentifizierung erforderlich
MAIN_MAIL_SMTPS_PW=SMTP Passwort, wenn Authentifizierung erforderlich
MAIN_MAIL_EMAIL_TLS= TLS (SSL)-Verschlüsselung verwenden
MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS)-Verschlüsselung verwenden
MAIN_DISABLE_ALL_SMS=Alle SMS-Funktionen abschalten (für Test- oder Demozwecke)
MAIN_SMS_SENDMODE=Methode zum Senden von SMS
MAIN_MAIL_SMS_FROM=Standard Versendetelefonnummer der SMS-Funktion

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Μέθοδος που χρησιμοποιείτε για α
MAIN_MAIL_SMTPS_ID=SMTP ID αν απαιτείται πιστοποίηση
MAIN_MAIL_SMTPS_PW=Κωδικός SMTP αν απαιτείται πιστοποίηση
MAIN_MAIL_EMAIL_TLS= Χρησιμοποιήστε TLS (SSL) κωδικοποίηση
MAIN_MAIL_EMAIL_STARTTLS= Χρησιμοποιήστε TLS (STARTTLS) κωδικοποίηση
MAIN_DISABLE_ALL_SMS=Απενεργοποίηση όλων των αποστολών SMS (για λόγους δοκιμής ή demos)
MAIN_SMS_SENDMODE=Μέθοδος που θέλετε να χρησιμοποιηθεί για την αποστολή SMS
MAIN_MAIL_SMS_FROM=Προεπιλεγμένος αριθμός τηλεφώνου αποστολέα για την αποστολή SMS

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails
MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required
MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required
MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt
MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

View File

@ -231,6 +231,7 @@ CustomerBillsUnpaid=Unpaid customer invoices
NonPercuRecuperable=Non-recoverable
SetConditions=Set payment terms
SetMode=Set payment mode
SetRevenuStamp=Set revenue stamp
Billed=Billed
RecurringInvoices=Recurring invoices
RepeatableInvoice=Template invoice

View File

@ -196,3 +196,4 @@ WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when dis
WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s.
WarningTooManyDataPleaseUseMoreFilters=Too many data (more than %s lines). Please use more filters or set the constant %s to a higher limit.
WarningSomeLinesWithNullHourlyRate=Some times were recorded by users when their hourly rate was not defined. A value of 0 was used but this may result in wrong valuation of time spent.
WarningYourLoginWasModifiedPleaseLogin=Your login was modified. For security purpose you will have to login with your new login before next action.

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - expensereports
RelatedExpenseReports=associated expense reports

View File

@ -8,6 +8,7 @@ BirthdayDate=Birthday
DateToBirth=Date of birth
BirthdayAlertOn= birthday alert active
BirthdayAlertOff= birthday alert inactive
Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention
Notify_FICHINTER_VALIDATE=Intervention validated
Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail
Notify_ORDER_VALIDATE=Customer order validated
@ -164,6 +165,7 @@ NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month
NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month
NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month
NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month
EMailTextInterventionAddedContact=A newintervention %s has been assigned to you.
EMailTextInterventionValidated=The intervention %s has been validated.
EMailTextInvoiceValidated=The invoice %s has been validated.
EMailTextProposalValidated=The proposal %s has been validated.

View File

@ -0,0 +1,21 @@
# Dolibarr language file - Source file is en_US - main
DIRECTION=ltr
FONTFORPDF=helvetica
FONTSIZEFORPDF=10
SeparatorDecimal=,
SeparatorThousand=None
FormatDateShort=%d/%m/%Y
FormatDateShortInput=%d/%m/%Y
FormatDateShortJava=dd/MM/yyyy
FormatDateShortJavaInput=dd/MM/yyyy
FormatDateShortJQuery=dd/mm/yy
FormatDateShortJQueryInput=dd/mm/yy
FormatHourShortJQuery=HH:MI
FormatHourShort=%H:%M
FormatHourShortDuration=%H:%M
FormatDateTextShort=%d %b %Y
FormatDateText=%d %B %Y
FormatDateHourShort=%d/%m/%Y %H:%M
FormatDateHourSecShort=%d/%m/%Y %H:%M:%S
FormatDateHourTextShort=%d %b %Y %H:%M
FormatDateHourText=%d %B %Y %H:%M

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Método de envío de e-mails
MAIN_MAIL_SMTPS_ID=ID de autentificación SMTP si se requiere autenticación SMTP
MAIN_MAIL_SMTPS_PW=Contraseña autentificación SMTP si se requiere autentificación SMTP
MAIN_MAIL_EMAIL_TLS= Uso de encriptación TLS (SSL)
MAIN_MAIL_EMAIL_STARTTLS= Uso de encriptación TLS (STARTTLS)
MAIN_DISABLE_ALL_SMS=Desactivar globalmente todo envío de SMS (para modo de pruebas o demo)
MAIN_SMS_SENDMODE=Método de envío de SMS
MAIN_MAIL_SMS_FROM=Número de teléfono por defecto para los envíos SMS

View File

@ -0,0 +1,21 @@
# Dolibarr language file - Source file is en_US - main
DIRECTION=ltr
FONTFORPDF=helvetica
FONTSIZEFORPDF=10
SeparatorDecimal=,
SeparatorThousand=None
FormatDateShort=%d/%m/%Y
FormatDateShortInput=%d/%m/%Y
FormatDateShortJava=dd/MM/yyyy
FormatDateShortJavaInput=dd/MM/yyyy
FormatDateShortJQuery=dd/mm/yy
FormatDateShortJQueryInput=dd/mm/yy
FormatHourShortJQuery=HH:MI
FormatHourShort=%H:%M
FormatHourShortDuration=%H:%M
FormatDateTextShort=%d %b %Y
FormatDateText=%d %B %Y
FormatDateHourShort=%d/%m/%Y %H:%M
FormatDateHourSecShort=%d/%m/%Y %H:%M:%S
FormatDateHourTextShort=%d %b %Y %H:%M
FormatDateHourText=%d %B %Y %H:%M

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=E-kirjade saatmiseks kasutatav meetod
MAIN_MAIL_SMTPS_ID=SMTP kasutaja, kui autentimine on nõutud
MAIN_MAIL_SMTPS_PW=SMTP parool, kui autentimine on nõutud
MAIN_MAIL_EMAIL_TLS= Kasuta TLS (SSL) krüpteerimist
MAIN_MAIL_EMAIL_STARTTLS= Kasuta TLS (STARTTLS) krüpteerimist
MAIN_DISABLE_ALL_SMS=Keela SMSide saatmine (testimise või demo paigaldused)
MAIN_SMS_SENDMODE=SMSi saatmiseks kasutatav meetod
MAIN_MAIL_SMS_FROM=Vaikimisi määratud saatja telefoninumber SMSide saatmiseks

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails
MAIN_MAIL_SMTPS_ID=SMTP ID-a autentifikazio behar bada
MAIN_MAIL_SMTPS_PW=SMTP parahitza autentifikazioa behar bada
MAIN_MAIL_EMAIL_TLS= TLS (SSL) enkriptazioa erabili
MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS) enkriptazioa erabili
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=SMS-ak bidaltzeko erabiliko den modua
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - expensereports
RelatedExpenseReports=associated expense reports

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=روش استفاده برای ارسال ایمیل
MAIN_MAIL_SMTPS_ID=SMTP ID اگر احراز هویت مورد نیاز
MAIN_MAIL_SMTPS_PW=SMTP رمز عبور در صورت احراز هویت مورد نیاز
MAIN_MAIL_EMAIL_TLS= استفاده از TLS (SSL) رمزگذاری
MAIN_MAIL_EMAIL_STARTTLS= استفاده از TLS (STARTTLS) رمزگذاری
MAIN_DISABLE_ALL_SMS=غیر فعال کردن همه sendings SMS (برای تست و یا دموی)
MAIN_SMS_SENDMODE=روش استفاده برای ارسال SMS
MAIN_MAIL_SMS_FROM=شماره تلفن پیش فرض فرستنده برای ارسال SMS

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Menetelmä käyttää lähettäessään Sähköpostit
MAIN_MAIL_SMTPS_ID=SMTP tunnus, jos vaaditaan
MAIN_MAIL_SMTPS_PW=SMTP Salasana jos vaaditaan
MAIN_MAIL_EMAIL_TLS= TLS (SSL) salaa
MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS) salaa
MAIN_DISABLE_ALL_SMS=Poista kaikki SMS-lähetysten (testitarkoituksiin tai demot)
MAIN_SMS_SENDMODE=Menetelmä käyttää lähettää tekstiviestejä
MAIN_MAIL_SMS_FROM=Default lähettäjän puhelinnumeroon tekstiviestien lähetykseen

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Méthode d'envoi des emails
MAIN_MAIL_SMTPS_ID=Identifiant d'authentification SMTP si authentification SMTP requise
MAIN_MAIL_SMTPS_PW=Mot de passe d'authentification SMTP si authentification SMTP requise
MAIN_MAIL_EMAIL_TLS= Utilisation du chiffrement TLS (SSL)
MAIN_MAIL_EMAIL_STARTTLS= Utilisation du chiffrement TLS (STARTTLS)
MAIN_DISABLE_ALL_SMS=Désactiver globalement tout envoi de SMS (pour mode test ou démos)
MAIN_SMS_SENDMODE=Méthode d'envoi des SMS
MAIN_MAIL_SMS_FROM=Numéro de téléphone par défaut pour l'envoi des SMS

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - expensereports
RelatedExpenseReports=Notes de frais associées

View File

@ -8,6 +8,7 @@ BirthdayDate=Date anniversaire
DateToBirth=Date de naissance
BirthdayAlertOn= alerte anniversaire active
BirthdayAlertOff= alerte anniversaire inactive
Notify_FICHINTER_ADD_CONTACT=Ajout contact à Intervention
Notify_FICHINTER_VALIDATE=Validation fiche intervention
Notify_FICHINTER_SENTBYMAIL=Envoi fiche d'intervention par email
Notify_ORDER_VALIDATE=Validation commande client
@ -164,6 +165,7 @@ NumberOfUnitsCustomerOrders=Nombre d'unités sur les commandes clients des 12 de
NumberOfUnitsCustomerInvoices=Nombre d'unités sur les factures clients des 12 derniers mois
NumberOfUnitsSupplierOrders=Nombre d'unités sur les commandes fournisseur des 12 derniers mois
NumberOfUnitsSupplierInvoices=Nombre d'unités sur les factures fournisseurs des 12 derniers mois
EMailTextInterventionAddedContact=Une nouvelle intervention %s vous a été assignée.
EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée.
EMailTextInvoiceValidated=La facture %s vous concernant a été validée.
EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée.

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=שיטה להשתמש כדי לשלוח מיילים
MAIN_MAIL_SMTPS_ID=SMTP מזהה אם נדרש אימות
MAIN_MAIL_SMTPS_PW=SMTP סיסמא אם נדרש אימות
MAIN_MAIL_EMAIL_TLS= השתמש ב-TLS (SSL) להצפין
MAIN_MAIL_EMAIL_STARTTLS= השתמש ב-TLS (STARTTLS) להצפין
MAIN_DISABLE_ALL_SMS=הפוך את כל sendings SMS (למטרות בדיקה או הדגמות)
MAIN_SMS_SENDMODE=שיטה להשתמש כדי לשלוח SMS
MAIN_MAIL_SMS_FROM=השולח ברירת מחדל מספר הטלפון לשליחת הודעות טקסט

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails
MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required
MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required
MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt
MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Method to use to send SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Módszer használata küldjön e-mailt
MAIN_MAIL_SMTPS_ID=SMTP hitelesítés szükséges, ha ID
MAIN_MAIL_SMTPS_PW=SMTP jelszó hitelesítés szükséges, ha
MAIN_MAIL_EMAIL_TLS= Használja a TLS (SSL) titkosítja
MAIN_MAIL_EMAIL_STARTTLS= Használja a TLS (STARTTLS) titkosítja
MAIN_DISABLE_ALL_SMS=Tiltsa le az összes SMS-küldések (vizsgálati célokra, vagy demo)
MAIN_SMS_SENDMODE=Módszer használatát, hogy küldjön SMS-
MAIN_MAIL_SMS_FROM=Alapértelmezett küldő telefonszámát az SMS-küldés

View File

@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode Pengiriman EMails
MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required
MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required
MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt
MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt
MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos)
MAIN_SMS_SENDMODE=Metode Pengiriman SMS
MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending

Some files were not shown because too many files have changed in this diff Show More