-
Notifications
You must be signed in to change notification settings - Fork 0
/
nouvel_achat.php
executable file
·178 lines (162 loc) · 7.23 KB
/
nouvel_achat.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?php include('includes/header.php');?>
<!-- Select2 -->
<link rel="stylesheet" href="plugins/select2/css/select2.min.css">
<!-- daterange picker -->
<link rel="stylesheet" href="plugins/daterangepicker/daterangepicker.css">
<!-- iCheck for checkboxes and radio inputs -->
<link rel="stylesheet" href="plugins/icheck-bootstrap/icheck-bootstrap.min.css">
<!-- Bootstrap Color Picker -->
<link rel="stylesheet" href="plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
<!-- Tempusdominus Bbootstrap 4 -->
<link rel="stylesheet" href="plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
<!-- Select2 -->
<link rel="stylesheet" href="plugins/select2/css/select2.min.css">
<link rel="stylesheet" href="plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
<!-- Bootstrap4 Duallistbox -->
<link rel="stylesheet" href="plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
<div class="col-12">
<!-- SELECT2 EXAMPLE -->
<div class="card card-default">
<div class="card-header">
<h3 class="card-title">Ajout nouvelle stock</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i></button>
<button type="button" class="btn btn-tool" data-card-widget="remove"><i class="fas fa-remove"></i></button>
</div>
</div>
<!-- /.card-header -->
<div class="card-body">
<form id="formulaire" name="formulaire" method="post" action="action/add_stock.php">
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/recolter.js" type="text/javascript"></script>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>Selectionnez le produit</label>
<select class="form-control select2bs4" style="width: 100%;" id="ref_produit" name="ref_produit" onchange="document.getElementById('tampon').value='recup';recolter();">
<option value="0" selected="selected">Choisir une référence</option>
<?php
$liaison = mysqli_connect('127.0.0.1', 'fly', 'root');
mysqli_select_db($liaison, 'stock_v3');
$requete = "SELECT id_produit, nom_produit FROM produit ORDER BY id_produit;";
$retours = mysqli_query($liaison, $requete);
while($retour = mysqli_fetch_array($retours))
{
echo "<option value='".$retour["id_produit"]."'>".$retour["id_produit"]."-".$retour["nom_produit"]."</option>";
}
?>-->
</select>
<input type="text" id="tampon" name="tampon" style="visibility:hidden;" />
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Nom du produit</label>
<input type="text" id="des_produit" name="des_produit" class="form-control" readonly="">
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
<div class="col-md-6">
<div class="form-group">
<label>Stock encours</label>
<input type="text" id="qte_produit_avt" name="qte_produit_avt" class="form-control" readonly="">
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Nouvelle quantité</label>
<input type="text" id="qte_produit" name="qte_produit" class="form-control">
</div>
<!-- /.form-group -->
<div class="form-group">
<label>Stock après mise à jour</label>
<input type="text" id="qte_produit_aps" name="qte_produit_aps" class="form-control" readonly="">
</div>
<!-- /.form-group -->
</div>
<!-- /.col -->
</div>
<input type="button" class="btn btn-outline-primary form-rounded" id="valider" name="valider" value="Valider la mise à jour" onclick="document.getElementById('tampon').value='maj';recolter();" />
<div id="msg_reponse" style="width:35%;height:75px;float:left;font-size:16px;font-weight:bold;text-align:left;">
<?php
echo "Réponse serveur";
?>
</div>
</form>
<!-- /.row -->
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- jQuery -->
<!<script src="js/jquery.min.js"></script>
<!-- Select2 -->
<script src="plugins/select2/js/select2.full.min.js"></script>
<!-- Bootstrap4 Duallistbox -->
<script src="plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
<!-- InputMask -->
<script src="plugins/moment/moment.min.js"></script>
<script src="plugins/inputmask/min/jquery.inputmask.bundle.min.js"></script>
<!-- Page script -->
<script>
$(function () {
//Initialize Select2 Elements
$('.select2').select2({
})
//Initialize Select2 Elements
$('.select2bs4').select2({
theme: 'bootstrap4',
})
//Datemask dd/mm/yyyy
$('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
//Datemask2 mm/dd/yyyy
$('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
//Money Euro
$('[data-mask]').inputmask()
//Date range picker
$('#reservation').daterangepicker()
//Date range picker with time picker
$('#reservationtime').daterangepicker({
timePicker: true,
timePickerIncrement: 30,
locale: {
format: 'MM/DD/YYYY hh:mm A'
}
})
//Date range as a button
$('#daterange-btn').daterangepicker(
{
ranges : {
'Today' : [moment(), moment()],
'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month' : [moment().startOf('month'), moment().endOf('month')],
'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
startDate: moment().subtract(29, 'days'),
endDate : moment()
},
function (start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'))
}
)
//Timepicker
$('#timepicker').datetimepicker({
format: 'LT'
})
//Bootstrap Duallistbox
$('.duallistbox').bootstrapDualListbox()
//Colorpicker
$('.my-colorpicker1').colorpicker()
//color picker with addon
$('.my-colorpicker2').colorpicker()
$('.my-colorpicker2').on('colorpickerChange', function(event) {
$('.my-colorpicker2 .fa-square').css('color', event.color.toString());
});
$("input[data-bootstrap-switch]").each(function(){
$(this).bootstrapSwitch('state', $(this).prop('checked'));
});
})
</script>
<?php include('includes/footer.php');?>