first
This commit is contained in:
commit
d731fb6608
486 files changed
+251018
No files matched your search
@@ -0,0 +1,311 @@
|
||||
{% extends "./customerBaseNew.html" %}
|
||||
{% load custom_tags %}
|
||||
{% load static %}
|
||||
|
||||
{% block BodyCustomer1 %}
|
||||
|
||||
<div id="hesabdari" class="column is-12-mobile is-12-desktop ">
|
||||
<h1 class="has-text-centered has-text-weight-bold toCurrency">
|
||||
مانده چک و نسیه:
|
||||
</h1>
|
||||
|
||||
{% if perms.admin_panel.ViewStore %}
|
||||
<!--<form method="post" action="{% url 'admin_panel:customerHesabdariAdd' customer.id %}" class="columns is-mobile is-multiline is-gapless mt-5 is-centered">
|
||||
{% csrf_token %}
|
||||
<div class="column is-12-mobile is-3-desktop">
|
||||
<span class="select is-fullwidth">
|
||||
<select required name="typePy" >
|
||||
<option value="">خدمات یا نصب</option>
|
||||
<option value="">هیچکدام</option>
|
||||
<option value="khadamat">خدمات</option>
|
||||
<option value="nasb">نصب</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="column is-12-mobile is-3-desktop">
|
||||
<span class="select is-fullwidth">
|
||||
<select required name="type" >
|
||||
<option value="">انتخاب کنید</option>
|
||||
<option value="credit">تسویه بدهی قبلی</option>
|
||||
<option value="debit">ایجاد بدهی جدید</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<div class="column is-12-mobile is-3-desktop ">
|
||||
<input required name="price" class="input" type="number" placeholder="مبلغ را به تومان وارد کنید">
|
||||
</div>
|
||||
<div class=" column is-12-mobile is-4-desktop ">
|
||||
<input required name="desc" class="input " type="text" placeholder="توضیحات">
|
||||
</div>
|
||||
<div class=" column is-12-mobile is-2-desktop">
|
||||
<input type="submit" class="button is-primary" value="ثبت" />
|
||||
</div>
|
||||
</form>!-->
|
||||
{% endif %}
|
||||
|
||||
<span class="button is-success mb-4" id="newSarresid">افزودن</span>
|
||||
|
||||
{% if all_sarresid %}
|
||||
<div class="table-container column is-12-desktop is-12-mobile m-0">
|
||||
<table class="table m-auto has-text-centered table is-bordered is-striped is-narrow is-fullwidth mojodiTB ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="min-width: 150px;">مبلغ</th>
|
||||
<th style="min-width: 100px;">نوع</th>
|
||||
<th style="min-width: 100px;">سررسید</th>
|
||||
<th style="min-width: 100px;">ثبت</th>
|
||||
<th style="min-width: 400px;">توضیحات</th>
|
||||
<th style="min-width: 100;">وضعیت</th>
|
||||
<th style="min-width: 100;">وصول شد</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th class="toCurrency" style="min-width: 150px;">مبلغ</th>
|
||||
<th style="min-width: 100px;">نوع</th>
|
||||
<th style="min-width: 100px;">سررسید</th>
|
||||
<th style="min-width: 100px;">ثبت</th>
|
||||
<th style="min-width: 400px;">توضیحات</th>
|
||||
<th style="min-width: 100;">وضعیت</th>
|
||||
<th style="min-width: 100;">وصول شد</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody id="listPrds">
|
||||
|
||||
{% for sarresid in all_sarresid %}
|
||||
<tr class="IteamPrd">
|
||||
<td>
|
||||
<span class="bedehkar toCurrency">{{ sarresid.price }}</span>
|
||||
<span class=" is-hidden"></span>
|
||||
</td>
|
||||
<td class="">
|
||||
{% if sarresid.type == 'check' %}چک{% endif %}
|
||||
{% if sarresid.type == 'nesiye' %}نسیه{% endif %}
|
||||
|
||||
</td>
|
||||
<td class="">{{ sarresid.sarresidDT | toJalali }}</td>
|
||||
<td class="">{{ sarresid.createdDT | toJalali }}</td>
|
||||
<td class="desc">
|
||||
{% if sarresid.desc %}
|
||||
{{ sarresid.desc }}
|
||||
{% endif %}
|
||||
{% if sarresid.factor.id %}
|
||||
فاکتور شماره {{ sarresid.factor.id }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="">
|
||||
{% if sarresid.payStatus == "true" %}پرداخت شده{% endif %}
|
||||
{% if sarresid.payStatus == "false" %}پرداخت نشده{% endif %}
|
||||
</td>
|
||||
|
||||
<td class="">
|
||||
{% if sarresid.payStatus == "false" %}
|
||||
<span class="button is-danger VosolButton" price={{ sarresid.price }} type={{ sarresid.type }} articlID={{ sarresid.id }}>وصول شد</span>
|
||||
{% else %}
|
||||
<span>بله</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<form class="modal modalAddNew" method="post" action="{% url 'admin_panel:addSarresid' customer.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">سررسید جدید</p>
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
|
||||
|
||||
<div class="field">
|
||||
<label class="label">نوع</label>
|
||||
<div class="control">
|
||||
<div class="select is-fullwidth">
|
||||
<select required class="reset_input" name="n_sarresidType">
|
||||
<option></option>
|
||||
<option value="check">چک</option>
|
||||
<option value="nesiye">نسیه</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">مبلغ</label>
|
||||
<div class="control">
|
||||
<input name="n_sarresidPrice" required class="input reset_input" type="text" placeholder="واحد تومان">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">تاریخ</label>
|
||||
<div class="control">
|
||||
<input name="xxxxxaaaa" required class="input reset_input" id="NewSarResid" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input required type="text" class="is-hidden reset_input" name="n_sarresidDateTime" id="NewSarResidVal">
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<input type="submit" class="button is-success" value="ثبت">
|
||||
<span class="button cancellBTNSR">لغو</span>
|
||||
</footer>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<form class="modal nesiyeModal" method="post" action="{% url 'admin_panel:pardakhtNesiye' customer.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">نسیه</p>
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
|
||||
|
||||
<div class="field">
|
||||
<label class="label">مانده از این نسیه</label>
|
||||
<div class="control">
|
||||
<input id="priceBedehi" disabled class="input reset_input" type="text" placeholder="واحد تومان">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input name="sr_articlID" id="sr_articlID" class="input reset_input is-hidden" type="text">
|
||||
|
||||
|
||||
<div class="field">
|
||||
<label class="label">مبلغ پرداختی فعلی</label>
|
||||
<div class="control">
|
||||
<input name="next_sarresidPrice" required class="input reset_input" type="text" placeholder="واحد تومان">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">نحوه پرداخت</label>
|
||||
<div class="control">
|
||||
<div class="select is-fullwidth">
|
||||
<select required class="reset_input" name="nahvePardakht">
|
||||
<option></option>
|
||||
<option value="naghd">نقد</option>
|
||||
<option value="kartbekart">کارت به کارت</option>
|
||||
<option value="kartkhan">کارت خوان</option>
|
||||
<option value="takhfif">تخفیف</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">سررسید بعدی</label>
|
||||
<div class="control">
|
||||
<input name="xxxxxaaaa" required class="input reset_input" id="NextSarResid" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">توضیحات</label>
|
||||
<div class="control">
|
||||
<textarea name="desc_sar" class="input"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input required type="text" class="is-hidden reset_input" name="next_sarresidDateTime" id="NextSarResidVal">
|
||||
|
||||
|
||||
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<input type="submit" class="button is-success" value="ثبت">
|
||||
<span class="button cancellBTNSR">لغو</span>
|
||||
</footer>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#newSarresid").click(function(){
|
||||
$(".modalAddNew").addClass("is-active")
|
||||
});
|
||||
|
||||
$(".modal-background").click(function(){
|
||||
$(".modal").removeClass("is-active");
|
||||
$('.reset_input').val('');
|
||||
})
|
||||
$(".cancellBTNSR").click(function(){
|
||||
$(".modal").removeClass("is-active");
|
||||
$('.reset_input').val('');
|
||||
})
|
||||
|
||||
$("#NewSarResid").pDatepicker({
|
||||
initialValue: false,
|
||||
initialValueType: 'en',
|
||||
format: 'YYYY/MM/DD',
|
||||
autoClose: true,
|
||||
calendar:{
|
||||
persian: {
|
||||
locale: 'fa'
|
||||
}
|
||||
},
|
||||
onSelect: (unix)=>{
|
||||
$("#NewSarResidVal").val(unix)
|
||||
}
|
||||
});
|
||||
|
||||
$("#NextSarResid").pDatepicker({
|
||||
initialValue: false,
|
||||
initialValueType: 'en',
|
||||
format: 'YYYY/MM/DD',
|
||||
autoClose: true,
|
||||
calendar:{
|
||||
persian: {
|
||||
locale: 'fa'
|
||||
}
|
||||
},
|
||||
onSelect: (unix)=>{
|
||||
$("#NextSarResidVal").val(unix)
|
||||
}
|
||||
});
|
||||
|
||||
$(".VosolButton").click(function(){
|
||||
|
||||
var articlID = $(this).attr("articlID")
|
||||
var type = $(this).attr("type")
|
||||
var price = $(this).attr("price")
|
||||
|
||||
if(type=="check"){
|
||||
if( confirm('چک وصول شده؟') ){
|
||||
if( confirm('در صورتی که از پاس شدن چک اطمینان دارید تایید کنید') ){
|
||||
window.location.href = '/panel/passCheck/'+articlID;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$(".nesiyeModal").addClass("is-active");
|
||||
$("#priceBedehi").val(price);
|
||||
$("#sr_articlID").val(articlID)
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user