mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
feat: pagamento parcial comanda part2
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{% load static %}
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left;">Produto</th>
|
||||
<th style="text-align: left;">Preço</th>
|
||||
<th style="text-align: left;"><b>Produto</b></th>
|
||||
<th style="text-align: left;"><b>Preço</b></th>
|
||||
</tr>
|
||||
|
||||
{% for item in consumo%}
|
||||
@@ -41,6 +41,15 @@
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if parcials%}
|
||||
<td colspan="2" style="text-align: center;"><b>Pagamentos parciais</b></td>
|
||||
{% endif %}
|
||||
{% for parcial in parcials %}
|
||||
<tr>
|
||||
<td>{{parcial.description}} ás {{parcial.datetime|date:"H:i"}}</td>
|
||||
<td>R$ -{{parcial.value}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center;">Total R$ {{total}}</td>
|
||||
@@ -1,16 +1,16 @@
|
||||
<tr>
|
||||
<th style="text-align: left;">Produto</th>
|
||||
<th style="text-align: left;">Preço</th>
|
||||
<th style="text-align: left;"><b>Produto</b></th>
|
||||
<th style="text-align: left;"><b>Preço</b></th>
|
||||
</tr>
|
||||
|
||||
{% for item in consumo%}
|
||||
|
||||
<tr>
|
||||
<td>{{item.product.name}}</td>
|
||||
<td>R$ {{item.product.price}}</td>
|
||||
<td>R$ {{item.product.price}} </td>
|
||||
<td><button class="btn-cancel" onclick="removeProductBalcao({{item.id}})"
|
||||
|
||||
>🗑️ Excluir</button></td>
|
||||
>Excluir</button></td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@@ -5,8 +5,9 @@ document.cookie = `pronto=0`;
|
||||
|
||||
function openModal() {
|
||||
document.getElementById('Modal-create-comanda').style.display = 'block';
|
||||
// HTMLDialogElement.show()
|
||||
// HTMLDialogElement.showModal()
|
||||
textField = document.getElementById('name-comanda')
|
||||
textField.focus()
|
||||
|
||||
}
|
||||
|
||||
function closeModal() {
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
function openModal() {
|
||||
document.getElementById('Modal-add-product').style.display = 'block';
|
||||
textField = document.getElementById('search-product')
|
||||
textField.value = '';
|
||||
textField.focus()
|
||||
}
|
||||
function openModalAlter() {
|
||||
document.getElementById('Modal-alter-comanda').style.display = 'block';
|
||||
@@ -23,8 +26,9 @@ function openModalObs(id) {
|
||||
document.getElementById('modal-obs').style.display = 'block';
|
||||
idd = document.getElementById('id-temp').value = id;
|
||||
obs = document.getElementById('obs').value;
|
||||
console.log(id);
|
||||
console.log(obs);
|
||||
textField = document.getElementById('obs')
|
||||
textField.focus()
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,15 +39,15 @@ function modal_payment_comanda() {
|
||||
}
|
||||
function modal_payment_parcial() {
|
||||
document.getElementById('payment-parcial').style.display = 'block';
|
||||
// recebido = document.getElementById('recebido')
|
||||
// recebido.focus()
|
||||
value = document.getElementById('value-parcial')
|
||||
value.focus()
|
||||
|
||||
}
|
||||
|
||||
|
||||
function modal_conta_client() {
|
||||
document.getElementById('conta-cliente').style.display = 'block';
|
||||
// recebido = document.getElementById('recebido')
|
||||
// recebido.focus()
|
||||
|
||||
}
|
||||
|
||||
function close_modal_conta_client() {
|
||||
@@ -51,6 +55,9 @@ function close_modal_conta_client() {
|
||||
}
|
||||
|
||||
|
||||
function close_modal_payment_parcial() {
|
||||
document.getElementById('payment-parcial').style.display = 'none';
|
||||
}
|
||||
function close_modal_payment_comanda() {
|
||||
document.getElementById('payment-comanda').style.display = 'none';
|
||||
}
|
||||
@@ -136,7 +143,7 @@ function imprimirConta() {
|
||||
|
||||
|
||||
var printWindow = window.open('', '_blank');
|
||||
printWindow.document.write('<table>'+content+'</table><b>Volte Sempre!😁😊</b>'+style);
|
||||
printWindow.document.write('<table>'+content+'</table><br><b>Volte Sempre!😁😊</b><br>'+style);
|
||||
printWindow.document.close();
|
||||
printWindow.print();
|
||||
printWindow.close();
|
||||
|
||||
Reference in New Issue
Block a user