index.blade.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. @extends('layouts.master')
  2. @section('content')
  3. <div class="row">
  4. <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
  5. <div class="panel panel-default">
  6. <div class="panel-heading">
  7. <h3 class="panel-title">Add New Revenue</h3>
  8. </div>
  9. <div class="panel-body">
  10. @include('layouts.message')
  11. <form action="{{ url('account/revenue/save') }}" method="POST" class="form-horizontal" role="form">
  12. {{ csrf_field() }}
  13. <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
  14. <div class="form-group">
  15. <label for="debit_head" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Debit Head</label>
  16. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  17. <select name="debit_head" id="debit_head" class="form-control">
  18. <option value="">-Select Account Head-</option>
  19. @if($account_types)
  20. @foreach($account_types as $type)
  21. <option value="{{ $type->id }}">{{ $type->name }}</option>
  22. @endforeach
  23. @endif
  24. </select>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label for="amount" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Amount</label>
  29. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  30. <input type="text" name="amount" id="amount" class="form-control" onkeypress="return checkNumber(event)" required placeholder="Amount">
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label for="description" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Description</label>
  35. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  36. <textarea name="description" id="description" class="form-control" placeholder="Description"></textarea>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <div class="col-sm-10 col-sm-offset-3">
  41. <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Save</button>
  42. <a href="{{ url('account/journal') }}" class="btn btn-default"><i class="fa fa-times"></i> Cancel</a>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
  47. <div class="form-group">
  48. <label for="credit_head" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Credit Head</label>
  49. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  50. <select name="credit_head" id="credit_head" class="form-control">
  51. <option value="">-Select Account Head-</option>
  52. @if($credit_heads)
  53. @foreach($credit_heads as $type)
  54. <option value="{{ $type->id }}">{{ $type->name }}</option>
  55. @endforeach
  56. @endif
  57. </select>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label for="client" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Client</label>
  62. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  63. <select name="client" id="client" class="form-control">
  64. <option value="">-Select Client-</option>
  65. @if($companies)
  66. @foreach($companies as $row)
  67. <option value="{{ $row->id }}">{{ $row->name}}</option>
  68. @endforeach
  69. @endif
  70. </select>
  71. </div>
  72. </div>
  73. <div class="form-group">
  74. <label for="date" class="col-sm-12 col-xs-12 col-md-3 col-lg-3 control-label">Date</label>
  75. <div class="col-xs-12 col-sm-12 col-md-7 col-lg-7">
  76. <input type="text" name="date" id="date" class='form-control date' value="{{ date('Y-m-d') }}">
  77. </div>
  78. </div>
  79. </div>
  80. </form>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. @stop
  86. @section('script')
  87. <script type="text/javascript">
  88. $(document).ready(function() {
  89. $( ".date" ).datepicker({
  90. changeMonth: true,
  91. changeYear: true,
  92. dateFormat:"yy-mm-dd"
  93. });
  94. });
  95. function checkNumber(evt)
  96. {
  97. var charCode = (evt.which) ? evt.which : evt.keyCode;
  98. if (charCode != 46 && charCode > 31
  99. && (charCode < 48 || charCode > 57))
  100. {
  101. alert('Invalid amount !!');
  102. return false;
  103. }
  104. return true;
  105. }
  106. </script>
  107. @stop