403 lines
12 KiB
Plaintext
403 lines
12 KiB
Plaintext
@page
|
|
@model ServiceHost.Areas.Financial.Pages.IndexModel
|
|
|
|
@{
|
|
ViewData["title"] = " - صورت حساب مالی ";
|
|
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #ffffff !important;
|
|
font: 12pt "IranSans";
|
|
-webkit-print-color-adjust: exact;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
}
|
|
@@media screen {
|
|
#printSection {
|
|
display: none;
|
|
}
|
|
}
|
|
.page {
|
|
margin: 0 auto;
|
|
position: relative;
|
|
top: 6mm;
|
|
left: 5mm;
|
|
width: 20cm;
|
|
padding: 12mm 0px;
|
|
min-height: 28.3cm;
|
|
height: 283mm;
|
|
border: 1px #D3D3D3 solid;
|
|
border-radius: 10px;
|
|
background: white;
|
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
|
font-family: 'IranSans';
|
|
}
|
|
|
|
.subpage {
|
|
padding: 1cm;
|
|
border: 5px red solid;
|
|
height: 256mm;
|
|
outline: 2cm #FFEAEA solid;
|
|
}
|
|
|
|
@@page {
|
|
size: A4;
|
|
margin: 0mm;
|
|
}
|
|
|
|
@@media print {
|
|
body * {
|
|
visibility: hidden;
|
|
page-break-after: auto;
|
|
}
|
|
html, body {
|
|
width: 210mm;
|
|
height: 297mm;
|
|
}
|
|
#printSection, #printSection * {
|
|
visibility: visible;
|
|
page-break-after: auto;
|
|
|
|
|
|
}
|
|
|
|
#printSection {
|
|
position: absolute;
|
|
left: 0;
|
|
page-break-after: auto;
|
|
top: 0;
|
|
|
|
}
|
|
|
|
footer {
|
|
page-break-after: auto;
|
|
display: none;
|
|
}
|
|
|
|
header {
|
|
display: none;
|
|
}
|
|
|
|
}
|
|
|
|
#printThis {
|
|
|
|
}
|
|
.tableHead {
|
|
border-bottom: 1px solid;
|
|
background-color: #fbfbfb !important;
|
|
-webkit-print-color-adjust: exact;
|
|
border-radius: 10px 10px 0px 0px;
|
|
|
|
width: 200mm;
|
|
position: relative;
|
|
top: -12mm;
|
|
right: -1px;
|
|
border: 1px #D3D3D3 solid;
|
|
font-family: 'IranSans';
|
|
padding: 10px;
|
|
color: #969696 !important;
|
|
font-size: 14px;
|
|
}
|
|
.tableTitle {
|
|
border-bottom: 1px solid;
|
|
background-color: #e9ecef !important;
|
|
-webkit-print-color-adjust: exact;
|
|
height: 11mm;
|
|
width: 193mm;
|
|
position: relative;
|
|
top: -8mm;
|
|
right: 3mm;
|
|
border: 1px #D3D3D3 solid;
|
|
color: #3d3d3d !important;
|
|
border-radius: 10px 10px 0px 0px;
|
|
}
|
|
.tableFooter {
|
|
border-top: 1px solid;
|
|
background-color: #e9ecef !important;
|
|
-webkit-print-color-adjust: exact;
|
|
width: 193mm;
|
|
display: inline-block;
|
|
position: relative;
|
|
top: -8mm;
|
|
right: 3mm;
|
|
border: 1px #D3D3D3 solid;
|
|
color: #3d3d3d !important;
|
|
border-radius: 0px 0px 10px 10px;
|
|
}
|
|
|
|
.tabelTitelChield {
|
|
display: inline-block;
|
|
text-align: center;
|
|
font-family: 'IranSans';
|
|
font-size: 12px;
|
|
padding: 10px;
|
|
}
|
|
|
|
|
|
|
|
|
|
.recordsTd {
|
|
display: inline-block;
|
|
width: 193mm;
|
|
position: relative;
|
|
top: -8mm;
|
|
right: 3mm;
|
|
border: 1px #D3D3D3 solid;
|
|
}
|
|
|
|
.recordTdChield {
|
|
|
|
font-family: 'IranSans';
|
|
font-size: 12px;
|
|
padding: 10px 0px;
|
|
border-left: 1px #D3D3D3 solid;
|
|
}
|
|
|
|
.recordTdBalance {
|
|
position: relative;
|
|
top: -1px;
|
|
font-family: 'IranSans';
|
|
font-size: 12px;
|
|
padding: 12px 0px;
|
|
background-color: #fefcf6 !important;
|
|
-webkit-print-color-adjust: exact;
|
|
|
|
}
|
|
.debtorTd {
|
|
color: #9f210c !important;
|
|
background-color: #fdf9fa !important;
|
|
-webkit-print-color-adjust: exact;
|
|
}
|
|
.creditorTd {
|
|
color: #2b8f1b !important;
|
|
background-color: #d1f7d9 !important;
|
|
-webkit-print-color-adjust: exact;
|
|
}
|
|
|
|
.contractingParty {
|
|
width: 150mm;
|
|
display: inline-block
|
|
}
|
|
|
|
.today {
|
|
float: left;
|
|
}
|
|
|
|
.paginationFoot {
|
|
text-align: center;
|
|
position: relative;
|
|
bottom: 30px;
|
|
font-size: 14px;
|
|
color: #7d7d7d !important;
|
|
background-color: #f7f7f7 !important;
|
|
width: 200mm;
|
|
border: 1px #D3D3D3 solid;
|
|
right: -0.3mm;
|
|
padding: 3px;
|
|
border-radius: 0px 0px 10px 10px;
|
|
-webkit-print-color-adjust: exact;
|
|
}
|
|
|
|
|
|
</style>
|
|
const string debtorTd = "debtorTd";
|
|
const string creditorTd = "creditorTd";
|
|
var pageNumber = 0;
|
|
}
|
|
|
|
@if (Model.HasData)
|
|
{
|
|
<div style="z-index: 999; position: relative; " dir="ltr">
|
|
<button id="btnPrint" class="btn btn-success" style="position: fixed;
|
|
top: 20px;
|
|
right: 100px;">پرینت</button>
|
|
@{
|
|
if (Model.GoBack == "true")
|
|
{
|
|
|
|
|
|
<button onclick="history.back();" class="btn btn-dark" style="position: fixed;
|
|
top: 20px;
|
|
right: 20px;">بازگشت</button>
|
|
}
|
|
}
|
|
</div>
|
|
|
|
|
|
<div id="printThis">
|
|
@foreach (var group in Model.GroupeList)
|
|
{
|
|
<div class="page" dir="rtl">
|
|
@{
|
|
pageNumber++;
|
|
}
|
|
<div class="tableHead">
|
|
<div style="text-align: center;
|
|
font-size: 12px;
|
|
padding: 0px 0px 10px 0px;
|
|
border-bottom: 1px solid #f2f2f2;">
|
|
<span>موسسه حقوقی نور دادمهر گستر کاسپین</span>
|
|
</div>
|
|
<div style="padding-top: 8px;">
|
|
<span class="contractingParty">
|
|
<span>صورت حساب</span>
|
|
@{
|
|
if (Model.IsLegal)
|
|
{
|
|
<span>شرکت</span>
|
|
<span> </span>
|
|
<span>:</span>
|
|
}
|
|
else
|
|
{
|
|
<span>آقای/خانم</span>
|
|
<span> </span>
|
|
<span>:</span>
|
|
}
|
|
}
|
|
<span>@Model.ContractingPartyName</span>
|
|
</span>
|
|
<span class="today">
|
|
<span>تاریخ گزارش : </span>
|
|
<span> </span>
|
|
<span>@Model.Today</span>
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
<div style="position: relative; height: 251mm">
|
|
<div class="tableTitle">
|
|
<span class="tabelTitelChield" style="width: 8mm; padding: 10px 5px;"> ردیف </span>
|
|
<span class="tabelTitelChield" style="width: 20mm;"> تاریخ </span>
|
|
<span class="tabelTitelChield" style="width: 88mm;"> شرح </span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> بدهکار </span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> بستانکار </span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> باقیمانده </span>
|
|
</div>
|
|
@foreach (var item in group.TransactionList)
|
|
{
|
|
<div class="recordsTd @{if (item.TypeOfTransaction == "debt"){@debtorTd}else{@creditorTd}}">
|
|
<span class="recordTdChield">
|
|
<span style="width: 8mm; display: inline-block; padding:10px; text-align: center;">@item.Counter </span>
|
|
</span>
|
|
<span class="recordTdChield">
|
|
<span style="width: 20mm; font-family: 'IranText'; display: inline-block; padding:10px 4px; text-align: center;">
|
|
@item.TdateFa
|
|
</span>
|
|
</span>
|
|
<span class="recordTdChield">
|
|
<span style="width: 88mm; display: inline-block;
|
|
text-overflow: ellipsis; padding:10px;
|
|
overflow-x: clip;
|
|
white-space: nowrap;
|
|
text-align: right;">@item.Description</span>
|
|
</span>
|
|
<span class="recordTdChield">
|
|
@{
|
|
if (item.TypeOfTransaction == "debt")
|
|
{
|
|
<span style="width: 23mm; display: inline-block;padding:10px; text-align: center;">@item.DeptorString</span>
|
|
}
|
|
else
|
|
{
|
|
<span style="width: 23mm; display: inline-block; visibility:hidden">1111111</span>
|
|
}
|
|
}
|
|
</span>
|
|
<span class="recordTdChield">
|
|
@{
|
|
if (item.TypeOfTransaction == "credit")
|
|
{
|
|
<span style="width: 23mm; display: inline-block;padding:10px; text-align: center;">@item.CreditorString</span>
|
|
}
|
|
else
|
|
{
|
|
<span style="width: 23mm; display: inline-block;padding:10px; text-align: center; visibility:hidden">1111111</span>
|
|
}
|
|
}
|
|
</span>
|
|
<span class="recordTdBalance">
|
|
@{
|
|
if (item.Balance > 0)
|
|
{
|
|
<span style="width: 24mm; display: inline-block;color: #9f210c !important;padding:10px; text-align: center;">
|
|
@item.BalanceString
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<span style="width: 24mm; display: inline-block; color: #2b8f1b !important;padding:10px; text-align: center;">
|
|
@item.BalanceString
|
|
</span>
|
|
}
|
|
}
|
|
|
|
</span>
|
|
</div>
|
|
}
|
|
|
|
<div class="tableFooter">
|
|
<span class="tabelTitelChield" style="width: 8mm;"> </span>
|
|
<span class="tabelTitelChield" style="width: 20mm;"> </span>
|
|
<span class="tabelTitelChield" style="width: 88mm;"> مجموع کل مبالغ </span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> @Model.TotalDebt </span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> @Model.TotalCredit</span>
|
|
<span class="tabelTitelChield" style="width: 23mm;"> @Model.TotalBalance </span>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="paginationFoot">
|
|
<span>صفحه</span>
|
|
<span> </span>
|
|
<span>
|
|
@{@pageNumber}
|
|
</span>
|
|
<span> </span>
|
|
<span>از</span>
|
|
<span> </span>
|
|
<span>@Model.pageCount</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
@section Script{
|
|
|
|
<script>
|
|
document.getElementById("btnPrint").onclick = function() {
|
|
printElement(document.getElementById("printThis"));
|
|
};
|
|
|
|
function printElement(elem) {
|
|
const domClone = elem.cloneNode(true);
|
|
|
|
var $printSection = document.getElementById("printSection");
|
|
|
|
if (!$printSection) {
|
|
$printSection = document.createElement("div");
|
|
$printSection.id = "printSection";
|
|
document.body.appendChild($printSection);
|
|
}
|
|
|
|
$printSection.innerHTML = "";
|
|
$printSection.appendChild(domClone);
|
|
window.print();
|
|
}
|
|
|
|
|
|
</script>
|
|
} }
|