Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
f458c384
Commit
f458c384
authored
11 years ago
by
Juanjo Menent
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Can not make withdrawals
Conflicts: ChangeLog
parent
55599f94
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+44
-0
44 additions, 0 deletions
ChangeLog
htdocs/compta/prelevement/class/bonprelevement.class.php
+16
-14
16 additions, 14 deletions
htdocs/compta/prelevement/class/bonprelevement.class.php
with
60 additions
and
14 deletions
ChangeLog
+
44
−
0
View file @
f458c384
...
...
@@ -80,6 +80,50 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
- Method form->select_methodes_commande() has been renamed into english name selectInputMethod().
***** ChangeLog for 3.5.2 compared to 3.5.1 *****
Fix: Can't add user for a task.
Fix: Autoselect of warehouse if there is only one warehouse.
Fix: Install of odt template for project and tasks.
Fix: [ bug #1318 ] Problem with enter key when adding an existing
product to a customer invoice.
Fix: [ bug #1307 ] Quotes get removed from several inputs.
Fix: [ bug #1317 ] Removing a category does not remove all child categories
Fix: [ bug #1312 ] Call to undefined function _()
Fix: Restore build for obs and launchpad.
Fix: deleting files into backup system tools.
Fix: Dump using php not not include lock on tables that are deleted.
Fix: Fixed a problem with bank accounts sharing across entities.
Fix: fields into group by of sql requests for module margins must be
same than fields into select.
Fix: When select_date is called with '' as preselected date,
automatic user date was not correctly et (We must set a date into PHP
server timezone area)
Fix: First param of select_date must always be forged with a dolibarr
date function and not time().
Fix: fix can't add line with product in supplier order
Fix: [bug #1309]
Fix: Solve pb of too many embedded tables
Fix: [ bug #1306 ] Fatal error when adding an external calendar
Fix: A fix to manage automatic creation of code for import.
Fix: Try to add code to provide easy way to fix warning on timezone not
defined.
Fix: Several fix into workflow/condition for invoice payments or convert
into discount.
Fix: Option MAIN_PDF_DASH_BETWEEN_LINES was not working when tcpdf was
making a pagebreak higher than 2 pages.
Fix: form to add images should not show link form.
Fix: Correction when adding order line with price as '0'.
Fix: [ bug #1283 ] ROUGET Shipment PDF.
Fix: [ bug #1300 ]
Fix: Miscellaneous problems on task tabs (withproject parameter lost and
download fails).
Fix: Avoid home project page to hung when too many tasks opened.
Fix: bug #1295: Error when creating an agenda extrafield with a number as reference
Fix: Translation of number for pt_PT.
Fix: Error on ajax_constantonoff function.
Fix: [ bug #1323 ] problème pour générer un odt depuis les taches dans projet.
Fix: Can not make withdrawals
***** ChangeLog for 3.5.1 compared to 3.5.0 *****
Fix: Do not report trigger errors twice.
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/prelevement/class/bonprelevement.class.php
+
16
−
14
View file @
f458c384
<?php
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-201
3
Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-201
2
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-201
4
Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-201
4
Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
...
...
@@ -681,9 +681,10 @@ class BonPrelevement extends CommonObject
/**
* Get number of invoices to withdrawal
* TODO delete params banque and agence when not necesary
*
* @param int $banque bank
* @param int $agence agence
* @param int $banque
dolibarr mysoc
bank
* @param int $agence
dolibarr mysoc
agence
* @return int <O if KO, number of invoices if OK
*/
function
NbFactureAPrelever
(
$banque
=
0
,
$agence
=
0
)
...
...
@@ -693,16 +694,16 @@ class BonPrelevement extends CommonObject
$sql
=
"SELECT count(f.rowid) as nb"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"facture as f"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"prelevement_facture_demande as pfd"
;
if
(
$banque
||
$agence
)
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe_rib as sr"
;
//
if ($banque || $agence) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr";
$sql
.
=
" WHERE f.fk_statut = 1"
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND f.rowid = pfd.fk_facture"
;
$sql
.
=
" AND f.paye = 0"
;
$sql
.
=
" AND pfd.traite = 0"
;
$sql
.
=
" AND f.total_ttc > 0"
;
if
(
$banque
||
$agence
)
$sql
.
=
" AND f.fk_soc = sr.rowid"
;
if
(
$banque
)
$sql
.
=
" AND sr.code_banque = '"
.
$conf
->
global
->
PRELEVEMENT_CODE_BANQUE
.
"'"
;
if
(
$agence
)
$sql
.
=
" AND sr.code_guichet = '"
.
$conf
->
global
->
PRELEVEMENT_CODE_GUICHET
.
"'"
;
//
if ($banque || $agence) $sql.= " AND f.fk_soc = sr.rowid";
//
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
//
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
$resql
=
$this
->
db
->
query
(
$sql
);
...
...
@@ -725,9 +726,10 @@ class BonPrelevement extends CommonObject
/**
* Create a withdraw
* TODO delete params banque and agence when not necesary
*
* @param int $banque
code of bank (to withdraw a specific bankof a specific customer. By default '')
* @param int $agence
code of
bank office (guichet)
(to withdraw a specific bankof a specific customer. By default '')
* @param int $banque
dolibarr mysoc bank
* @param int $agence
dolibarr mysoc
bank office (guichet)
* @param string $mode real=do action, simu=test only
* @return int <0 if KO, nbre of invoice withdrawed if OK
*/
...
...
@@ -765,17 +767,17 @@ class BonPrelevement extends CommonObject
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"facture as f"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"prelevement_facture_demande as pfd"
;
if
(
$banque
||
$agence
)
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe_rib as sr"
;
//
if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
$sql
.
=
" WHERE f.rowid = pfd.fk_facture"
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND s.rowid = f.fk_soc"
;
if
(
$banque
||
$agence
)
$sql
.
=
" AND s.rowid = sr.fk_soc"
;
//
if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
$sql
.
=
" AND f.fk_statut = 1"
;
$sql
.
=
" AND f.paye = 0"
;
$sql
.
=
" AND pfd.traite = 0"
;
$sql
.
=
" AND f.total_ttc > 0"
;
if
(
$banque
)
$sql
.
=
" AND sr.code_banque = '"
.
$conf
->
global
->
PRELEVEMENT_CODE_BANQUE
.
"'"
;
if
(
$agence
)
$sql
.
=
" AND sr.code_guichet = '"
.
$conf
->
global
->
PRELEVEMENT_CODE_GUICHET
.
"'"
;
//
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
//
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
dol_syslog
(
get_class
(
$this
)
.
"::Create sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment