Fixed to use LedgerBase not Ledger in reports as that excluded salary accounts.

Some cleanup.
This commit is contained in:
Tanshu 2012-10-18 00:18:20 +05:30
parent 6edd04b817
commit c85b8669bd
19 changed files with 20 additions and 425 deletions

@ -1,26 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<hr />
<!-- Contact form -->
<section>
<h2 class="ribbon-header">${title}</h2>
<form id="contact-form" method="post" action="sendmail.php">
<p>
<label for="cf_name">Name <span class="required">(Required *)</span></label>
<input type="text" name="cf_name" id="cf_name" class="required" required />
</p>
<p>
<input type="submit" value="Submit" />
</p>
</form>
<div class="form-sent"></div>
</section>
<!-- /Contact form -->
</tal:block>
</html>

@ -21,8 +21,6 @@
<li><a href="${request.route_url('trial_balance')}">Trail Balance</a></li> <li><a href="${request.route_url('trial_balance')}">Trail Balance</a></li>
<li><a href="${request.route_url('trial_balance')}">Differential Trail Balance</a></li> <li><a href="${request.route_url('trial_balance')}">Differential Trail Balance</a></li>
<li><a href="${request.route_url('profit_loss')}">Profit and Loss</a></li> <li><a href="${request.route_url('profit_loss')}">Profit and Loss</a></li>
<li><a href="${request.route_url('profit_loss')}">Balance Sheet</a></li>
<li><a href="${request.route_url('profit_loss')}">Full Balance Sheet</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="content">
<ul class="thumbnails">
% for item in links:
<li>
<div class="thumbnail">
<a href="${request.route_url(item['route'])}" class="btn btn-large btn-success" style="height: 180px; width: 230px; text-align: center; display: table-cell; vertical-align: middle;">${item['title']}</a>
</div>
</li>
% endfor
</ul>
</%block>

@ -1,45 +0,0 @@
# -*- coding: utf-8 -*-
<%inherit file="../base.mako"/>
<%block name="content">
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div class="row show-grid">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Particulars</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="span10">
<ul class="thumbnails small">
% for item in links:
<li>
<div class="thumbnail">
<a href="${request.route_url('table', id=item.id)}" class="btn btn-large btn-success">${item.name}</a>
</div>
</li>
% endfor
</ul>
</div>
</div>
</div>
</%block>

@ -1,46 +0,0 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="base">
<tal:block metal:fill-slot="content">
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div class="row show-grid">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Particulars</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
<tr>
<td>ABC</td>
<td>1</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="span10">
<ul class="thumbnails small">
<li tal:repeat="item links">
<div class="thumbnail">
<a href="${request.route_url('table', id=item.id)}" class="btn btn-large btn-success">${item.name}</a>
</div>
</li>
</ul>
</div>
</div>
</div>
</tal:block>
</html>

@ -1,25 +0,0 @@
<!-- Widget tags list -->
<nav class="widget-container widget-archive">
<h2 class="widget-heading">Archive</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="January 2011 Archive">January 2011</a>
<span class="widget-hint">13 Items</span>
</li>
<li>
<a href="#" title="December 2010 Archive">December 2010</a>
<span class="widget-hint">6 Items</span>
</li>
<li>
<a href="#" title="November 2010 Archive">November 2010</a>
<span class="widget-hint">3 Items</span>
</li>
<li>
<a href="#" title="October 2010 Archive">October 2010</a>
<span class="widget-hint">5 Items</span>
</li>
</ul>
</div>
</nav>
<!-- /Widget tags list -->

@ -1,13 +0,0 @@
<!-- Widget blogroll -->
<nav class="widget-container widget-blogroll">
<h2 class="widget-heading">Blogroll</h2>
<div class="widget-content">
<ul>
<li><a href="#" title="Wordpress website">Wordpress.org</a></li>
<li><a href="#" title="Google's website">Google.com</a></li>
<li><a href="#" title="Long sitename">Some long site title</a></li>
<li><a href="#" title="Design booom themes">Dbooom themes</a></li>
</ul>
</div>
</nav>
<!-- /Widget blogroll -->

@ -1,27 +0,0 @@
<nav class="widget-container widget-categories">
<h2 class="widget-heading">Categories</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="Design category">Design</a>
<span class="widget-hint">136 Posts</span>
</li>
<li>
<a href="#" title="Coding category">Coding</a>
<span class="widget-hint">67 Posts</span>
</li>
<li>
<a href="#" title="Inspiration category">Inspiration</a>
<span class="widget-hint">61 Posts</span>
</li>
<li>
<a href="#" title="Project management category">Project management</a>
<span class="widget-hint">24 Posts</span>
</li>
<li>
<a href="#" title="FX's category">FX's</a>
<span class="widget-hint">16 Posts</span>
</li>
</ul>
</div>
</nav>

@ -1,29 +0,0 @@
<!-- Widget comments -->
<nav class="widget-container widget-comments">
<h2 class="widget-heading">Recent comments</h2>
<div class="widget-content">
<ul>
<li>
<a href="#" title="Comment for Post One">Phasellus lacinia, magna a...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Donec accumsan malesuada...</a>
<span class="widget-hint"><a href="#">Nickname</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Udipiscing elit mauris sifermeum...</a>
<span class="widget-hint"><a href="#">Long nickname</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Adipiscing elit maurise...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
<li>
<a href="#" title="Comment for Post One">Phasellus lacinia, magna a ulla long...</a>
<span class="widget-hint"><a href="#">Admin</a></span>
</li>
</ul>
</div>
</nav>
<!-- /Widget comments -->

@ -1,31 +0,0 @@
<!-- Row -->
<section class="widget-container widget-contact-form">
<h2 class="widget-heading">Contact form</h2>
<div class="widget-content">
<!-- Contact form -->
<form id="contact-form-widget" method="post" action="sendmail.php">
<p>
<label for="cf_name">Name <span class="required">(Required *)</span></label>
<input type="text" name="cf_name" id="cf_name" class="required" required />
</p>
<p>
<label for="cf_email">Email <span class="required">(Required *)</span></label>
<input type="email" name="cf_email" id="cf_email" class="required email" required />
</p>
<p>
<label for="cf_message">Message</label>
<textarea name="cf_message" id="cf_message" class="required" rows="5" required></textarea>
</p>
<p>
<input type="submit" value="Send message" />
</p>
</form>
<div class="form-sent"></div>
<!-- /Contact form -->
</div>
</section>
<!-- /Row -->

@ -1,17 +0,0 @@
<!-- Widget comments -->
<nav class="widget-container widget-events">
<h2 class="widget-heading">Events</h2>
<div class="widget-content">
<ul>
<li>
<span class="date">04 / 20 / 2011 - 9:30 PM</span>
<a href="#">Vestibulum eu orci libero</a>
<p>Teger erat sem, euismod eget elem entum eu, faucibus at felis. Donec a turpis velit. Ut a elementum lorem. Curabitur id tortor nunc.</p>
<li>
<span class="date">04 / 20 / 2011 - 9:30 PM</span>
<a href="#">Vestibulum eu orci libero</a>
<p>Teger erat sem, euismod eget elem entum eu, faucibus at felis. Donec a turpis velit. Ut a elementum lorem. Curabitur id tortor nunc.</p>
</ul>
</div>
</nav>
<!-- /Widget comments -->

@ -1,20 +0,0 @@
<!-- Footer -->
<footer id="page-footer" class="container_12 clearfix">
<!-- Footer credits -->
<div class="grid_6 footer-info">
<p>© Copyright 2011 <a href="http://dbooom.com/themes/html/manifest">Dbooom Themes</a> - All Rights Reserved</p>
</div>
<!-- /Footer credits -->
<!-- Footer navigation -->
<nav class="grid_6 footer-navigation">
<ul>
<li><a href="${request.route_url('home')}" title="Frontpage">Home</a></li>
<li><a href="blog.html" title="Blog">Blog</a></li>
<li><a href="portfolio-1.html" title="Portfolio">Portfolio</a></li>
<li><a href="${request.route_url('contact')}" title="Contact information">Contacts</a></li>
</ul>
</nav>
<!-- /Footer navigation -->
</footer>
<!-- /Footer -->

@ -1,42 +0,0 @@
<!-- Row -->
<nav class="widget-container widget-gallery">
<h2 class="widget-heading">Gallery widget</h2>
<div class="widget-content">
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
<a href="${request.static_url('brewman:static/assets/590x290.gif')}" class="img-holder round-3 gallery-last" rel="prettyPhoto[gallery-1]" title="Image gallery">
<img src="${request.static_url('brewman:static/assets/70x70.gif')}" width="70" height="70" alt="Gallery item" />
</a>
</div>
</nav>
<!-- /Row -->

@ -1,28 +0,0 @@
<!-- Widget recent posts-->
<nav class="widget-container widget-recent-posts">
<h2 class="widget-heading">Recent posts</h2>
<div class="widget-content">
<ul>
<!-- Post item -->
<li>
<a href="blog-post.html" class="img-holder round-3 align-left" title="Proceed to post">
<img src="assets/70x70.gif" title="Post image" />
</a>
<a class="post-link" href="blog-post.html" title="Euismod tincidunt ut laoreet dolore magna...">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent felis nulla, lacinia sodales placerat quis...</a>
<time class="post-created" datetime="2011-01-14T23:31:45+01:00">January 14, 2011</time>
</li>
<!-- /Post item -->
<!-- Post item -->
<li>
<a href="blog-post.html" class="img-holder round-3 align-left" title="Proceed to post">
<img src="assets/70x70.gif" title="Post image" />
</a>
<a class="post-link" href="blog-post.html" title="Euismod tincidunt ut laoreet dolore magna...">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent felis nulla, lacinia sodales placerat quis...</a>
<time class="post-created" datetime="2011-01-14T23:31:45+01:00">January 14, 2011</time>
</li>
<!-- /Post item -->
</ul>
</div>
</nav>
<!-- /Widget recent posts-->

@ -1,6 +0,0 @@
<!-- Row -->
<section class="widget-container widget-tweets">
<h2 class="widget-heading">Recent tweets</h2>
<div class="widget-content"></div>
</section>
<!-- /Row -->

@ -5,7 +5,7 @@ from sqlalchemy.sql.expression import func, desc
from pyramid.view import view_config from pyramid.view import view_config
from brewman.models import DBSession from brewman.models import DBSession
from brewman.models.master import Ledger, LedgerType from brewman.models.master import LedgerBase, LedgerType
from brewman.models.voucher import Voucher, Journal from brewman.models.voucher import Voucher, Journal
from brewman.views.services.session import services_session_period_start, services_session_period_finish from brewman.views.services.session import services_session_period_start, services_session_period_finish
@ -41,7 +41,7 @@ def build_report(request, start_date, finish_date):
report = {'StartDate': start_date, 'FinishDate': finish_date, 'Body': [], 'Footer': []} report = {'StartDate': start_date, 'FinishDate': finish_date, 'Body': [], 'Footer': []}
sub_voucher = aliased(Voucher) sub_voucher = aliased(Voucher)
sub_journal = aliased(Journal) sub_journal = aliased(Journal)
sub_ledger = aliased(Ledger) sub_ledger = aliased(LedgerBase)
sub_query = DBSession.query(sub_voucher.id)\ sub_query = DBSession.query(sub_voucher.id)\
.join(sub_journal, sub_voucher.journals)\ .join(sub_journal, sub_voucher.journals)\
@ -50,12 +50,12 @@ def build_report(request, start_date, finish_date):
.filter(sub_voucher.date >= datetime.datetime.strptime(start_date, '%d-%b-%Y'))\ .filter(sub_voucher.date >= datetime.datetime.strptime(start_date, '%d-%b-%Y'))\
.filter(sub_voucher.date <= datetime.datetime.strptime(finish_date, '%d-%b-%Y')).subquery() .filter(sub_voucher.date <= datetime.datetime.strptime(finish_date, '%d-%b-%Y')).subquery()
query = DBSession.query(Ledger.type, func.sum(Journal.signed_amount))\ query = DBSession.query(LedgerBase.type, func.sum(Journal.signed_amount))\
.join(Journal, Voucher.journals)\ .join(Journal, Voucher.journals)\
.join(Ledger, Journal.ledger)\ .join(LedgerBase, Journal.ledger)\
.filter(Voucher.id.in_(sub_query))\ .filter(Voucher.id.in_(sub_query))\
.filter(Ledger.type != LedgerType.by_name('Cash').id)\ .filter(LedgerBase.type != LedgerType.by_name('Cash').id)\
.group_by(Ledger.type)\ .group_by(LedgerBase.type)\
.order_by(func.sum(Journal.signed_amount)).all() .order_by(func.sum(Journal.signed_amount)).all()
totalInflow = 0 totalInflow = 0
@ -82,7 +82,7 @@ def build_report_id(request, ledger_type, start_date, finish_date):
report = {'StartDate': start_date, 'FinishDate': finish_date, 'Body': [], 'Footer': []} report = {'StartDate': start_date, 'FinishDate': finish_date, 'Body': [], 'Footer': []}
sub_voucher = aliased(Voucher) sub_voucher = aliased(Voucher)
sub_journal = aliased(Journal) sub_journal = aliased(Journal)
sub_ledger = aliased(Ledger) sub_ledger = aliased(LedgerBase)
sub_query = DBSession.query(sub_voucher.id)\ sub_query = DBSession.query(sub_voucher.id)\
.join(sub_journal, sub_voucher.journals)\ .join(sub_journal, sub_voucher.journals)\
@ -91,12 +91,12 @@ def build_report_id(request, ledger_type, start_date, finish_date):
.filter(sub_voucher.date >= datetime.datetime.strptime(start_date, '%d-%b-%Y'))\ .filter(sub_voucher.date >= datetime.datetime.strptime(start_date, '%d-%b-%Y'))\
.filter(sub_voucher.date <= datetime.datetime.strptime(finish_date, '%d-%b-%Y')).subquery() .filter(sub_voucher.date <= datetime.datetime.strptime(finish_date, '%d-%b-%Y')).subquery()
query = DBSession.query(Ledger, func.sum(Journal.signed_amount))\ query = DBSession.query(LedgerBase, func.sum(Journal.signed_amount))\
.join(Journal, Voucher.journals)\ .join(Journal, Voucher.journals)\
.join(Ledger, Journal.ledger)\ .join(LedgerBase, Journal.ledger)\
.filter(Voucher.id.in_(sub_query))\ .filter(Voucher.id.in_(sub_query))\
.filter(Ledger.type == ledger_type)\ .filter(LedgerBase.type == ledger_type)\
.group_by(Ledger)\ .group_by(LedgerBase)\
.order_by(desc(func.sum(Journal.amount))).all() .order_by(desc(func.sum(Journal.amount))).all()
totalInflow = 0 totalInflow = 0

@ -6,7 +6,7 @@ import uuid
from pyramid.view import view_config from pyramid.view import view_config
from brewman.models import DBSession from brewman.models import DBSession
from brewman.models.master import Ledger from brewman.models.master import LedgerBase
from brewman.models.voucher import Voucher, Journal, VoucherType from brewman.models.voucher import Voucher, Journal, VoucherType
from brewman.views.services.session import services_session_period_start, services_session_period_finish from brewman.views.services.session import services_session_period_start, services_session_period_finish
@ -28,7 +28,7 @@ def ledger_display_post(request):
return {'StartDate': services_session_period_start(request), return {'StartDate': services_session_period_start(request),
'FinishDate': services_session_period_finish(request), 'Ledger': {}, 'Body': [], 'Footer': {}} 'FinishDate': services_session_period_finish(request), 'Ledger': {}, 'Body': [], 'Footer': {}}
else: else:
ledger = Ledger.by_id(uuid.UUID(id)) ledger = LedgerBase.by_id(uuid.UUID(id))
start_date = request.GET.get('StartDate', services_session_period_start(request)) start_date = request.GET.get('StartDate', services_session_period_start(request))
finish_date = request.GET.get('FinishDate', services_session_period_finish(request)) finish_date = request.GET.get('FinishDate', services_session_period_finish(request))
info = {'StartDate': start_date, 'FinishDate': finish_date, info = {'StartDate': start_date, 'FinishDate': finish_date,

@ -4,7 +4,6 @@ from sqlalchemy.sql.expression import func
import uuid import uuid
from pyramid.view import view_config from pyramid.view import view_config
from brewman.helpers import Literal
from brewman.models import DBSession from brewman.models import DBSession
from brewman.models.master import Product, CostCenter from brewman.models.master import Product, CostCenter
@ -21,29 +20,6 @@ def ledger_display_get(request):
return {} return {}
def product_ledger_get(request):
product_id = request.matchdict.get('id', None)
product = Product.by_id(uuid.UUID(product_id))
startDate = request.GET.get('startDate', None)
finishDate = request.GET.get('finishDate', None)
report = build_report(request, product, startDate, finishDate)
body = Literal(report['body'])
footer = Literal(report['footer'])
startDate = Literal("$('#txtStartDate').val('{0}');".format(startDate))
finishDate = Literal("$('#txtFinishDate').val('{0}');".format(finishDate))
product = Literal("$('#txtProduct').val('{0}');".format(product.full_name))
return {'title': 'Display Ledger - Hops n Grains',
'pageclass': "page-blogpost page-sidebar-right",
'pagecontentclass': "page-content grid_12",
'page_header': '',
'body': body,
'footer': footer,
'startDate': startDate,
'finishDate': finishDate,
'product': product}
@view_config(request_method='GET', route_name='product_ledger_id', renderer='json', xhr=True) @view_config(request_method='GET', route_name='product_ledger_id', renderer='json', xhr=True)
@view_config(request_method='GET', route_name='product_ledger', renderer='json', xhr=True) @view_config(request_method='GET', route_name='product_ledger', renderer='json', xhr=True)
def ledger_display_post(request): def ledger_display_post(request):
@ -62,20 +38,6 @@ def ledger_display_post(request):
return info return info
@view_config(request_method='POST', route_name='product_ledger', renderer='json', xhr=True)
def product_ledger_post(request):
productID = request.json_body['productID']
if productID == '':
productString = request.json_body['productString']
product = Product.by_full_name(productString)
else:
productID = uuid.UUID(productID)
product = Product.by_id(productID)
startDate = request.json_body['startDate']
finishDate = request.json_body['finishDate']
return build_report(request, product, startDate, finishDate)
def build_report(request, info): def build_report(request, info):
product_id = info['Product']['ProductID'] product_id = info['Product']['ProductID']
start_date = info['StartDate'] start_date = info['StartDate']
@ -146,6 +108,9 @@ def opening_balance(product_id, start_date):
if quantity and quantity > 0: if quantity and quantity > 0:
debitQuantity = "{0:.2f}".format(quantity) debitQuantity = "{0:.2f}".format(quantity)
debitAmount = "\u20B9 {0:.2f}".format(amount) debitAmount = "\u20B9 {0:.2f}".format(amount)
else:
debitQuantity = ''
debitAmount = ''
if quantity is None: if quantity is None:
quantity = 0 quantity = 0

@ -4,7 +4,7 @@ from sqlalchemy.sql.expression import func
from pyramid.view import view_config from pyramid.view import view_config
from brewman.models import DBSession from brewman.models import DBSession
from brewman.models.master import Ledger from brewman.models.master import LedgerBase
from brewman.models.voucher import Voucher, Journal, VoucherType from brewman.models.voucher import Voucher, Journal, VoucherType
from brewman.views.services.session import services_session_period_finish from brewman.views.services.session import services_session_period_finish
@ -30,10 +30,10 @@ def trial_balance(request):
def build_report(date): def build_report(date):
date = datetime.datetime.strptime(date, '%d-%b-%Y') date = datetime.datetime.strptime(date, '%d-%b-%Y')
amount_sum = func.sum(Journal.amount * Journal.debit).label('Amount') amount_sum = func.sum(Journal.amount * Journal.debit).label('Amount')
query = DBSession.query(Ledger, amount_sum)\ query = DBSession.query(LedgerBase, amount_sum)\
.join(Journal.voucher).join(Journal.ledger)\ .join(Journal.voucher).join(Journal.ledger)\
.filter(Voucher.date < date).filter(Voucher.type != VoucherType.by_name('Issue').id).group_by(Ledger)\ .filter(Voucher.date < date).filter(Voucher.type != VoucherType.by_name('Issue').id).group_by(LedgerBase)\
.order_by(Ledger.type).order_by(func.abs(amount_sum).desc()).all() .order_by(LedgerBase.type).order_by(func.abs(amount_sum).desc()).all()
body = [] body = []