Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model DashboardSettings
- @{
- string ReportGuid = Guid.NewGuid().ToString();
- WemsyStructureAccounting StructureAccounting = WemsyStructureAccountingDB.GetAll(new DBPagination(SessionHelper.CurrentUser, SearchCriterions: Model.SearchCriterions));
- }
- @if (StructureAccounting.Bookyears.Count > 0)
- {
- <table id='@ReportGuid' class="table table-striped table-bordered table-hover" style="display: none;">
- <thead>
- <tr>
- <th>@Html.Translate("Description")</th>
- @foreach (WemsyCalendar Bookyear in StructureAccounting.Bookyears.OrderByDescending(b => b.Bookyear))
- {
- <th class="text-right">@Bookyear.BookyearName</th>
- }
- </tr>
- </thead>
- <tbody>
- @foreach (WemsyStructureAccountingLine StructureAccountingLine in StructureAccounting)
- {
- <tr style="background-color:@StructureAccountingLine.StructureLine.BackColor; color:@StructureAccountingLine.StructureLine.ForeColor" data-tt-id="@StructureAccountingLine.StructureLine.ID" data-tt-parent-id="@StructureAccountingLine.StructureLine.ParentStructureLineID">
- @*<td class="text-nowrap">@dr["Description_Shiftable"]</td>*@
- <td title="@StructureAccountingLine.StructureLine.Description">@StructureAccountingLine.StructureLine.Description.Truncate(60, "...")</td>
- @if (StructureAccountingLine.StructureLine.DisplayType.ToUpper() != "HiddenForSpecialColumns".ToUpper())
- {
- foreach (WemsyCalendar Bookyear in StructureAccountingLine.Bookyears.OrderByDescending(b => b.Bookyear))
- {
- <td class="text-right">@Html.DisplayAmount(Bookyear.Amount)</td>
- }
- }
- else
- {
- foreach (WemsyCalendar Bookyear in StructureAccountingLine.Bookyears)
- {
- <td></td>
- }
- }
- </tr>
- }
- </tbody>
- </table>
- }
- else
- {
- @Html.Translate("Please select criterions")
- }
- @Html.Partial("~/Views/Report/Tools/QueryViewer.cshtml", Model)
- @Html.Script(
- @<script type="text/javascript">
- $(function () {
- SyntaxHighlighter.all();
- $('#@ReportGuid').treetable({
- expandable: true,
- clickableNodeNames: true,
- initialState: 'expanded'
- });
- // $("td.colorize:contains('-')").css('color', '#FF0000');
- $("td.colorize:contains('-')").css('font-size', '10px');
- // $("td.colorize:contains('+')").css('color', '#00FF00');
- $("td.colorize:contains('+')").css('font-size', '10px');
- // $("td.colorize").filter(function () { return $(this).text() === "0,00 €"; }).css('color', '#BDBDBD');
- $("td.colorize").filter(function () { return $(this).text() === "0,00 €"; }).css('font-size', '10px');
- $('#@ReportGuid').DataTable({
- responsive: true,
- dom: '<"html5buttons"B>lTfgtpi',
- ordering: false,
- pageLength: 1000,
- buttons: [
- { extend: 'copy' },
- { extend: 'csv' },
- { extend: 'excel', title: 'ExampleFile', exportOptions: { format: { body: function (data, row, column, node) { return column >= 1 ? node.textContent.replace(/[€.]/g, '').replace(/[,]/g, '.') : node.textContent; } } } },
- { extend: 'pdf', title: 'ExampleFile' },
- { extend: 'print', customize: function (win) { $(win.document.body).addClass('white-bg'); $(win.document.body).css('font-size', '10px'); $(win.document.body).find('table').addClass('compact').css('font-size', 'inherit'); } }
- ]
- });
- $('#@ReportGuid').show();
- });
- </script>
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement