Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ptbcli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Daniele Nicolodi
ptbcli
Commits
4c744a85
Commit
4c744a85
authored
1 year ago
by
Daniele Nicolodi
Browse files
Options
Downloads
Patches
Plain Diff
orders: Show deluivery date in summary
Switch to beanquery to take advantage of BQL improvements.
parent
84d52a21
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
orders.py
+6
-6
6 additions, 6 deletions
orders.py
with
6 additions
and
6 deletions
orders.py
+
6
−
6
View file @
4c744a85
...
@@ -26,9 +26,9 @@ from operator import itemgetter
...
@@ -26,9 +26,9 @@ from operator import itemgetter
from
beancount
import
loader
from
beancount
import
loader
from
beancount.core
import
data
from
beancount.core
import
data
from
beancount.parser
import
parser
from
beancount.parser
import
parser
from
beancount.query
import
query
from
beancount.parser.printer
import
print_errors
from
beancount.parser.printer
import
print_errors
from
beancount.ingest.similar
import
amounts_map
from
beancount.ingest.similar
import
amounts_map
from
beanquery
import
query
EMPTY
=
frozenset
()
EMPTY
=
frozenset
()
...
@@ -1114,19 +1114,19 @@ def summary(conf, account, verbose):
...
@@ -1114,19 +1114,19 @@ def summary(conf, account, verbose):
entry_meta(
'
date
'
) AS date,
entry_meta(
'
date
'
) AS date,
entry_meta(
'
requisition-date
'
) AS rdate,
entry_meta(
'
requisition-date
'
) AS rdate,
entry_meta(
'
order-date
'
) AS odate,
entry_meta(
'
order-date
'
) AS odate,
entry_meta(
'
delivery-date
'
) AS ddate,
entry_meta(
'
payment-date
'
) AS pdate,
entry_meta(
'
payment-date
'
) AS pdate,
leaf(account) AS account
account
FROM
coalesce(entry_meta(
'
requisition
'
), 99999999) < 10199999
WHERE
WHERE
entry_meta(
'
requisition
'
) < 4000000000 AND
account ~
'
Assets:
'
AND
{
condition
}
account ~
'
Assets:
'
AND
{
condition
}
ORDER BY
ORDER BY
entry_meta(
'
date
'
)
"""
)
entry_meta(
'
date
'
)
"""
)
table
=
petl
.
pushheader
(
rows
,
[
name
for
name
,
rtype
in
types
])
\
table
=
petl
.
pushheader
(
rows
,
[
name
for
name
,
_
in
types
])
\
.
convert
(
'
release
'
,
lambda
v
:
'
X
'
*
int
(
v
))
.
convert
(
'
release
'
,
lambda
v
:
'
X
'
*
int
(
v
))
for
column
in
'
rid
'
,
'
oid
'
,
'
rdate
'
,
'
odate
'
,
'
pdate
'
:
for
column
in
'
rid
'
,
'
oid
'
,
'
rdate
'
,
'
odate
'
,
'
ddate
'
,
'
pdate
'
:
table
=
table
.
replace
(
column
,
None
,
''
)
table
=
table
.
replace
(
column
,
None
,
''
)
today
=
datetime
.
date
.
today
()
today
=
datetime
.
date
.
today
()
...
...
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