print option in bill details screen fixed

This commit is contained in:
gandhimathi 2018-08-28 16:29:18 +05:30
parent e9097fcc93
commit c552cea597
3 changed files with 18 additions and 32 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -2324,28 +2324,14 @@ app.controller('FeesModalInstanceCtrl', ["$scope", "$modalInstance", "$timeout",
$scope.printPdf = function (print) {
var innerContents = document.getElementById(print).innerHTML;
var popupWinindow = window.open('', '_blank', 'width=1200,height=700,scrollbars=no,menubar=no,toolbar=no,location=no,status=no,titlebar=no');
popupWinindow.document.open();
popupWinindow.document.write('<html>');
popupWinindow.document.write('<style type="text/css" media="print">');
popupWinindow.document.write('@page { size: portrait; }');
//popupWinindow.document.write('.title{border:3px solid black;}');
popupWinindow.document.write('</style>');
popupWinindow.document.write(innerContents);
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
popupWinindow.document.write('</br>');
popupWinindow.document.write(innerContents);
popupWinindow.document.write('</html>');
popupWinindow.document.close();
popupWinindow.focus();
popupWinindow.print();
popupWinindow.close();
var printHtml = document.getElementById(print).outerHTML;
//var currentPage = document.body.innerHTML;
var elementPage = '<html><head><style type="text/css" media="print">@media print {#Header, #Footer { display:none !important; }}</style></head><body>' + printHtml + '<br><br>' + printHtml + '</body>';
document.body.innerHTML = elementPage;
window.print();
document.body.innerHTML = elementPage;
window.location.reload();
document.close();
}
// $scope.mouseLeave = function(){

View File

@ -448,32 +448,32 @@
</table>
<div id="print" after-render="printPdf">
<div id="print" pdf-save-content="{{billNo}}" after-render="printPdf">
<div ng-if="myPdfView">
<table style="border-collapse: collapse; color: black;" border="0" width="100%">
<tbody class="title" style="border:3px solid black;">
<tr style="height: 23px;">
<td ng-if="BranchLogo=='' || BranchLogo==null" style="width: 136px; height: 82px; color: white; font-size: 22px; text-align: center;" rowspan="3">
<tr class="title-row" style="height: 15px;">
<td class="title-branch" ng-if="BranchLogo=='' || BranchLogo==null" style="width: 136px; height: 82px; color: white; font-size: 22px; text-align: center;" rowspan="3">
<div class="user-image">
<img class="pull-center" ng-src="assets/images/logo.png" alt="APP">
<img class="pull-center" ng-src="assets/images/logo1.png" alt="APP">
<!-- <img ng-src="{{userInfo.avatar}}" alt="" ng-if="!obj.flow.files.length && !noImage">
<img flow-img="obj.flow.files[0]" ng-if="obj.flow.files.length">-->
</div>
</td>
<td ng-if="BranchLogo!='' && BranchLogo!=null" style="width: 136px; height: 82px; color: white; font-size: 22px; text-align: center;" rowspan="3">
<td class="title-branch" ng-if="BranchLogo!='' && BranchLogo!=null" style="width: 136px; height: 82px; color: white; font-size: 22px; text-align: center;" rowspan="3">
<div class="user-image">
<img class="pull-center" ng-src="images/{{BranchLogo}}" alt="APP">
<!-- <img ng-src="{{userInfo.avatar}}" alt="" ng-if="!obj.flow.files.length && !noImage">
<img flow-img="obj.flow.files[0]" ng-if="obj.flow.files.length">-->
</div>
</td>
<div>
<td style="width: 136px; height: 23px; text-align: center; color: black; font-size: 20px;" colspan="3"><strong><!--APOLLO DISTANCE EDUCATION COLLEGE-->{{FeesReceiptTitle}}</strong>
</div>
<td class="title-addr" style="width: 500px; height: 23px; text-align: center; color: black; font-size: 20px;" colspan="3" ><strong><!--APOLLO DISTANCE EDUCATION COLLEGE-->{{FeesReceiptTitle || "APOLLO DISTANCE EDUCATION COLLEGE"}}</strong>
</br>
<!--<span style="font-size: 16px;">(A Group of SVE Trust)</span>
</br>-->
<span style="white-space:pre-wrap;font-size: 16px;">{{BranchAddr}}</span>
<span style="font-size: 16px;text-align:left;">{{BranchAddr}}</span>
</td>
</tr>
@ -524,7 +524,7 @@
<td style="width: 137px; height: 110px;"><strong style="font-size: 12px;">For APOLLO DISTANCE EDUCATION COLLEGE</strong></td>
</tr>
<tr class="title" style="border:3px solid black;height: 42px;">
<td style="width: 136px; height: 42px; color: black; font-size: 14px;text-align: center;" colspan="4">Note: Terms & Conditions will be applicable as per University norms Fees once paid will not be refunded at any reasons</td>
<td style="width: 136px; height: 42px; color: black; font-size: 12px;text-align: center;" colspan="4">Note: Terms & Conditions will be applicable as per University norms Fees once paid will not be refunded at any reasons</td>
</tr>
</tbody>