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
37f92ad5
Commit
37f92ad5
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Can exclude deposit, replacement or credit notes in script rebuild_merge_pdf
parent
5a80ce51
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
+2
-0
2 additions, 0 deletions
ChangeLog
scripts/invoices/rebuild_merge_pdf.php
+48
-2
48 additions, 2 deletions
scripts/invoices/rebuild_merge_pdf.php
with
50 additions
and
2 deletions
ChangeLog
+
2
−
0
View file @
37f92ad5
...
@@ -3,6 +3,7 @@ English Dolibarr ChangeLog
...
@@ -3,6 +3,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.0 compared to 2.9 *****
***** ChangeLog for 3.0 compared to 2.9 *****
For users:
For users:
- New: Can exclude deposit, replacement or credit notes in script rebuild_merge_pdf.
- New: task #10473 : Option MAIN_PROFIDx_IN_ADDRESS must no more be hidden.
- New: task #10473 : Option MAIN_PROFIDx_IN_ADDRESS must no more be hidden.
- New: Can generate business card for on particular member.
- New: Can generate business card for on particular member.
- New: Task #10553 : Can attach files on members card.
- New: Task #10553 : Can attach files on members card.
...
@@ -25,6 +26,7 @@ For users:
...
@@ -25,6 +26,7 @@ For users:
- New: Add option to send all emails sent to a bulk carbon copy.
- New: Add option to send all emails sent to a bulk carbon copy.
- New: Preview of emails sent by member module is shown.
- New: Preview of emails sent by member module is shown.
- New: task #10100 : Add button to create invoice from a subscription
- New: task #10100 : Add button to create invoice from a subscription
- New: Reorganize tabs on third parties.
- Perf: Avoid reading database to determine country code after each
- Perf: Avoid reading database to determine country code after each
page call.
page call.
- Fix: Better Postgresql compatibility.
- Fix: Better Postgresql compatibility.
...
...
This diff is collapsed.
Click to expand it.
scripts/invoices/rebuild_merge_pdf.php
+
48
−
2
View file @
37f92ad5
...
@@ -84,7 +84,7 @@ foreach ($argv as $key => $value)
...
@@ -84,7 +84,7 @@ foreach ($argv as $key => $value)
if
(
$value
==
'filter=all'
)
if
(
$value
==
'filter=all'
)
{
{
$found
=
true
;
$found
=
true
;
$option
.
=
'all'
;
$option
.
=
(
empty
(
$option
)
?
''
:
'_'
)
.
'all'
;
$filter
[]
=
'all'
;
$filter
[]
=
'all'
;
print
'Rebuild PDF for all invoices'
.
"
\n
"
;
print
'Rebuild PDF for all invoices'
.
"
\n
"
;
...
@@ -121,6 +121,31 @@ foreach ($argv as $key => $value)
...
@@ -121,6 +121,31 @@ foreach ($argv as $key => $value)
print
'Rebuild PDF for invoices with no payment done yet.'
.
"
\n
"
;
print
'Rebuild PDF for invoices with no payment done yet.'
.
"
\n
"
;
}
}
if
(
$value
==
'filter=nodeposit'
)
{
$found
=
true
;
$option
.
=
(
empty
(
$option
)
?
''
:
'_'
)
.
'nodeposit'
;
$filter
[]
=
'nodeposit'
;
print
'Exclude deposit invoices'
.
"
\n
"
;
}
if
(
$value
==
'filter=noreplacement'
)
{
$found
=
true
;
$option
.
=
(
empty
(
$option
)
?
''
:
'_'
)
.
'noreplacement'
;
$filter
[]
=
'noreplacement'
;
print
'Exclude replacement invoices'
.
"
\n
"
;
}
if
(
$value
==
'filter=nocreditnote'
)
{
$found
=
true
;
$option
.
=
(
empty
(
$option
)
?
''
:
'_'
)
.
'nocreditnote'
;
$filter
[]
=
'nocreditnote'
;
print
'Exclude credit note invoices'
.
"
\n
"
;
}
if
(
!
$found
&&
preg_match
(
'/filter=/i'
,
$value
))
if
(
!
$found
&&
preg_match
(
'/filter=/i'
,
$value
))
{
{
usage
();
usage
();
...
@@ -181,6 +206,24 @@ if (in_array('payments',$filter))
...
@@ -181,6 +206,24 @@ if (in_array('payments',$filter))
$sqlwhere
.
=
" AND p.datep <= "
.
$db
->
idate
(
$paymentdatebefore
);
$sqlwhere
.
=
" AND p.datep <= "
.
$db
->
idate
(
$paymentdatebefore
);
$sqlorder
=
" ORDER BY p.datep ASC"
;
$sqlorder
=
" ORDER BY p.datep ASC"
;
}
}
if
(
in_array
(
'nodeposit'
,
$filter
))
{
if
(
empty
(
$sqlwhere
))
$sqlwhere
=
' WHERE '
;
else
$sqlwhere
.
=
" AND"
;
$sqlwhere
.
=
' type <> 3'
;
}
if
(
in_array
(
'noreplacement'
,
$filter
))
{
if
(
empty
(
$sqlwhere
))
$sqlwhere
=
' WHERE '
;
else
$sqlwhere
.
=
" AND"
;
$sqlwhere
.
=
' type <> 1'
;
}
if
(
in_array
(
'nocreditnote'
,
$filter
))
{
if
(
empty
(
$sqlwhere
))
$sqlwhere
=
' WHERE '
;
else
$sqlwhere
.
=
" AND"
;
$sqlwhere
.
=
' type <> 2'
;
}
if
(
$sqlwhere
)
$sql
.
=
$sqlwhere
;
if
(
$sqlwhere
)
$sql
.
=
$sqlwhere
;
if
(
$sqlorder
)
$sql
.
=
$sqlorder
;
if
(
$sqlorder
)
$sql
.
=
$sqlorder
;
...
@@ -346,6 +389,9 @@ function usage()
...
@@ -346,6 +389,9 @@ function usage()
print
"Usage: "
.
$script_file
.
" filter=all
\n
"
;
print
"Usage: "
.
$script_file
.
" filter=all
\n
"
;
print
"To build/merge PDF for invoices with no payments, use filter=nopayment
\n
"
;
print
"To build/merge PDF for invoices with no payments, use filter=nopayment
\n
"
;
print
"Usage: "
.
$script_file
.
" filter=nopayment
\n
"
;
print
"Usage: "
.
$script_file
.
" filter=nopayment
\n
"
;
print
"To exclude credit notes, use filter=nocreditnote
\n
"
;
print
"To exclude replacement invoices, use filter=noreplacement
\n
"
;
print
"To exclude deposit invoices, use filter=nodeposit
\n
"
;
print
"
\n
"
;
print
"
\n
"
;
print
"Example: "
.
$script_file
.
" filter=payments 20080101 20081231 lang=fr_FR
\n
"
;
print
"Example: "
.
$script_file
.
" filter=payments 20080101 20081231 lang=fr_FR
\n
"
;
print
"Example: "
.
$script_file
.
" filter=all lang=it_IT
\n
"
;
print
"Example: "
.
$script_file
.
" filter=all lang=it_IT
\n
"
;
...
...
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