部分打印区PHP

时间:2018-01-17 23:48:02

标签: php

我有点新手,只需要小代码的帮助。

我需要使用我已经添加的打印付款记录打印特定区域,我已经添加了一个新按钮,尝试了另一个教程,但我无法做到,我的其他代码打印整个页面。

我知道我可以突出显示该表并点击打印但是当记录像50次付款时,按钮更容易。

以详细信息开始存款费用。

请帮帮忙!

这是我的代码:



@extends('branch.layout.main')
@section('title') Manage Fee @endsection

@section('content')
<div class="container">
    <div class="section">

        @section('button')
        <a href="#AddNew" class="btn cyan waves-effect waves-light right modal-trigger" style="margin-top:25px">Deposit Fee</a>
        @endsection
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="card-panel">
                    <div class="row">
                        <h4 class="header2" style="color:#00bcd4"><i class="mdi-social-person" style="font-size:20px"></i> Fee Detail of {{ $student->first_name." ".$student->last_name }}</h4>

                        <table class="striped" >
                            <thead>
                                <tr>
                                    <th>Current Course</th>
                                    <th>Course Fee</th>
                                    <th>Discount</th>
                                    <th>Any Extra</th>
                                    <th>Total Payable</th>
                                    <th>Deposited Fee</th>
                                    <th>Balance</th>
                                </tr>
                                <tr>
                                    <td width="20%">{{ $course->courseName }}</td>
                                    <td width="13%">{{ IMS::currency().$course->course_fee }}</td>
                                    <td width="13%">{{ IMS::currency().$course->discount }}</td>
                                    <td width="13%">{{ IMS::currency().$extra }}</td>
                                    <td width="13%">{{ IMS::currency().$payable }}</td>
                                    <td width="13%">{{ IMS::currency().$deposited }}</td>
                                    <td width="13%"><span style="color:red">{{ IMS::currency().$balance }}</span></td>
                                </tr>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--Deposited Fee in Detail-->
    @if(count($fees) > 0)
    <div class="row">
        <div class="col s12 m12 l12">
            <div class="card-panel">
                <div class="row">
                    <h4 class="header2" style="color:#00bcd4"><i class="mdi-content-add" style="font-size:20px"></i> Deposited Fee of {{ $student->first_name." ".$student->last_name }}</h4>

 					<button onclick="printContent('row')">Print Payment Record </button>


  <table class="striped" >
                        <thead>
                            <tr>
                                <th>Date Added</th>
                                <th>Amount</th>
                                <th>Course</th>
                                <th>Due Date</th>
                                <th>Option</th>
                            </tr>
                            @foreach($fees as $fee)
                            <tr>
                                <td width="20%">{{ date('d-M-Y',strtotime($fee->date_added)) }}</td>
                                <td width="20%">{{ IMS::currency().$fee->amount }}</td>
                                <td width="20%">{{ $fee->courseName }}</td>
                                <td width="20%">@if($fee->due_date) {{ date('d-M-Y',strtotime($fee->due_date)) }} @else --- @endif</td>
                                <td width="20%">
                                    <a href="{{ Asset('fee/print/'.$fee->id) }}" class="btn cyan tooltipped " data-position="top" data-delay="50" data-tooltip="Print Invoice" style="padding:0px 10px" target="_blank"><i class="mdi-maps-local-print-shop"></i></a>
                                    <a href="{{ Asset('fee/printDownload/'.$fee->id) }}" class="btn cyan tooltipped " data-position="top" data-delay="50" data-tooltip="Download Invoice" style="padding:0px 10px" target="_blank"><i class="mdi-maps-local-print-shop"></i></a>
                                    @if($delete)
                                        <a href="javascript::void()" class="btn red tooltipped " data-position="top" data-delay="50" data-tooltip="Delete This Entry" style="padding:0px 10px" onclick="confirmAlert('{{ Asset('fee/delete/'.$fee->id) }}')"><i class="mdi-content-clear"></i></a>
                                    @endif
                                </td>
                            </tr>
                            @endforeach
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
@endif
<!--End Deposited Fee in Detail-->

<!--Add New Fee-->
<div id="AddNew" class="modal modal-fixed-footer">
    <div class="modal-content">
        <h4 class="header2">Deposit Fee For {{ $student->first_name }} {{ $student->last_name }}</h4>
        <form action="{{ Asset('fee/'.$student->id) }}" method="post">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <div class="row">
                <div class="input-field col s6">
                    <i class="mdi-editor-insert-invitation prefix"></i>
                    {!! Form::date('date_added',date('Y-m-d'),['id' => 'date_added','class' => 'datepicker']) !!}
                    <label for="date_added">Date Added *</label>
                </div>
                <div class="input-field col s6">
                    <i class="mdi-editor-attach-money prefix"></i>
                    {!! Form::number('amount',null,['id' => 'amount','required' => 'required','pattern' => '[0-9]{10}']) !!}
                    <label for="amount">Amount *</label>
                </div>
            </div>
            <div class="row">
                <div class="input-field col s6">
                    <select name="payment_mode">
                        <option>Please select Payment Type</option>
                        <option>Cash</option>
                        <option>Cheque</option>
                        <option>Card</option>
                        <option>Credit or Discount</option>
                    </select>
                </div>
                <div class="input-field col s6">
                    {!! Form::text('cheque_Card_Number', null, ['id' => 'cheque_Card_Number']) !!}
                </div>
            </div>
            <p style="color:red"><i class="fa fa-bell"></i> If you want fee due reminder then select fee due date,if not then leave empty</p>
            <div class="row">
                <div class="input-field col s12">
                    <i class="mdi-editor-insert-invitation prefix"></i>
                    {!! Form::date('due_date',null,['id' => 'due_date','class' => 'datepicker']) !!}
                    <label for="due_date">Due Date</label>
                </div>
            </div>
            <div class="modal-footer">
                <a href="#" class="waves-effect waves-red btn-flat modal-action modal-close">Close</a>
                <button type="submit" class="btn blue modal-action modal-close">Save</button>
            </div>
        </form>
    </div>
</div>
<!--End Add New Fee-->
@endsection
&#13;
&#13;
&#13;

0 个答案:

没有答案