Emmmanuel FIADUFE

Emmmanuel FIADUFE

  • 784
  • 1.1k
  • 55.3k

Angular ControllerJS and MVC C# application

Oct 20 2023 5:37 PM

Hello Team,
Please am using angular controllerJS in my MVC application and bootstrap template to print transactions after sales,
but in the process of printing, the template sidebar and the invoice print together and want i want to do is to hide the sidebar 

function GetAllPrintSalesRecord() {
            debugger;
            const urlParams = new URLSearchParams(window.location.search);
            const OrderNo = urlParams.get('OrderNo');
          
           .then(function (response) {
               var data = response.data.modifiedData;
               $scope.PrintSalesRecordList = data;
               $scope.Total = response.data.total;
               $scope.DiscountTotal = response.data.discount;
               $scope.VatTotal = response.data.tax;
               debugger
               if ($scope.$$phase) {
                   $scope.$apply();
               }
               
              
           });
        }
    }]);
}).call(angular);

<script>


    //Print Script
    $('#invoice-printed').click(function () {
        $('body').css('visibility', 'hidden');
        $('#accordionSidebar').css('display', 'none');
        $('.panel-body').css('visibility', 'visible');
        $('#exampleInputUser').css('display', 'none');
        window.print();
        $('#accordionSidebar').css('display', '');
        $('body').css('visibility', 'visible');
    });
</script>


Answers (3)