change to rial
This commit is contained in:
		
							parent
							
								
									dd64b7b47c
								
							
						
					
					
						commit
						02415f4dee
					
				
					 11 changed files with 56 additions and 56 deletions
				
			
		| 
						 | 
					@ -435,7 +435,7 @@
 | 
				
			||||||
                                {% if qi.item.description %}<small class="text-muted">{{ qi.item.description }}</small>{% endif %}
 | 
					                                {% if qi.item.description %}<small class="text-muted">{{ qi.item.description }}</small>{% endif %}
 | 
				
			||||||
                              </div>
 | 
					                              </div>
 | 
				
			||||||
                            </td>
 | 
					                            </td>
 | 
				
			||||||
                            <td>{{ qi.unit_price|floatformat:0|intcomma:False }} تومان</td>
 | 
					                            <td>{{ qi.unit_price|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                            <td>
 | 
					                            <td>
 | 
				
			||||||
                              <span class="text-muted">{% if removed_qty|get_item:qi.item.id %}{{ removed_qty|get_item:qi.item.id }}{% else %}{{ qi.quantity }}{% endif %}</span>
 | 
					                              <span class="text-muted">{% if removed_qty|get_item:qi.item.id %}{{ removed_qty|get_item:qi.item.id }}{% else %}{{ qi.quantity }}{% endif %}</span>
 | 
				
			||||||
                            </td>
 | 
					                            </td>
 | 
				
			||||||
| 
						 | 
					@ -474,7 +474,7 @@
 | 
				
			||||||
                                {% if it.description %}<small class="text-muted">{{ it.description }}</small>{% endif %}
 | 
					                                {% if it.description %}<small class="text-muted">{{ it.description }}</small>{% endif %}
 | 
				
			||||||
                              </div>
 | 
					                              </div>
 | 
				
			||||||
                            </td>
 | 
					                            </td>
 | 
				
			||||||
                            <td>{{ it.unit_price|floatformat:0|intcomma:False }} تومان</td>
 | 
					                            <td>{{ it.unit_price|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                            <td>
 | 
					                            <td>
 | 
				
			||||||
                              {% with add_entry=added_map|get_item:it.id %}
 | 
					                              {% with add_entry=added_map|get_item:it.id %}
 | 
				
			||||||
                              <input class="form-control form-control-sm" type="number" min="1" name="add_{{ it.id }}_qty" value="{% if add_entry %}{{ add_entry.qty }}{% endif %}">
 | 
					                              <input class="form-control form-control-sm" type="number" min="1" name="add_{{ it.id }}_qty" value="{% if add_entry %}{{ add_entry.qty }}{% endif %}">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,13 +57,13 @@ class InvoiceAdmin(SimpleHistoryAdmin):
 | 
				
			||||||
    status_display.short_description = "وضعیت"
 | 
					    status_display.short_description = "وضعیت"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def paid_amount_display(self, obj):
 | 
					    def paid_amount_display(self, obj):
 | 
				
			||||||
        return f"{obj.get_paid_amount():,.0f} تومان"
 | 
					        return f"{obj.get_paid_amount():,.0f} ریال"
 | 
				
			||||||
    paid_amount_display.short_description = "مبلغ پرداخت شده"
 | 
					    paid_amount_display.short_description = "مبلغ پرداخت شده"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def remaining_amount_display(self, obj):
 | 
					    def remaining_amount_display(self, obj):
 | 
				
			||||||
        amount = obj.get_remaining_amount()
 | 
					        amount = obj.get_remaining_amount()
 | 
				
			||||||
        color = "green" if amount <= 0 else "red"
 | 
					        color = "green" if amount <= 0 else "red"
 | 
				
			||||||
        return format_html('<span style="color: {};">{:,.0f} تومان</span>', color, amount)
 | 
					        return format_html('<span style="color: {};">{:,.0f} ریال</span>', color, amount)
 | 
				
			||||||
    remaining_amount_display.short_description = "مبلغ باقیمانده"
 | 
					    remaining_amount_display.short_description = "مبلغ باقیمانده"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@admin.register(Payment)
 | 
					@admin.register(Payment)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,7 +38,7 @@ class Item(NameSlugModel):
 | 
				
			||||||
        ordering = ['name']
 | 
					        ordering = ['name']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        return f"{self.name} - {self.unit_price} تومان"
 | 
					        return f"{self.name} - {self.unit_price} ریال"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Quote(NameSlugModel):
 | 
					class Quote(NameSlugModel):
 | 
				
			||||||
    """مدل پیشفاکتور"""
 | 
					    """مدل پیشفاکتور"""
 | 
				
			||||||
| 
						 | 
					@ -383,7 +383,7 @@ class Payment(BaseModel):
 | 
				
			||||||
        ordering = ['-payment_date']
 | 
					        ordering = ['-payment_date']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        return f"پرداخت {self.amount} تومان - {self.invoice.name}"
 | 
					        return f"پرداخت {self.amount} ریال - {self.invoice.name}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def save(self, *args, **kwargs):
 | 
					    def save(self, *args, **kwargs):
 | 
				
			||||||
        """بروزرسانی مبالغ فاکتور"""
 | 
					        """بروزرسانی مبالغ فاکتور"""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -124,8 +124,8 @@
 | 
				
			||||||
            <th style="width: 30%">شرح کالا/خدمات</th>
 | 
					            <th style="width: 30%">شرح کالا/خدمات</th>
 | 
				
			||||||
            <th style="width: 30%">توضیحات</th>
 | 
					            <th style="width: 30%">توضیحات</th>
 | 
				
			||||||
            <th style="width: 10%">تعداد</th>
 | 
					            <th style="width: 10%">تعداد</th>
 | 
				
			||||||
            <th style="width: 12.5%">قیمت واحد(تومان)</th>
 | 
					            <th style="width: 12.5%">قیمت واحد(ریال)</th>
 | 
				
			||||||
            <th style="width: 12.5%">قیمت کل(تومان)</th>
 | 
					            <th style="width: 12.5%">قیمت کل(ریال)</th>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
        </thead>
 | 
					        </thead>
 | 
				
			||||||
        <tbody>
 | 
					        <tbody>
 | 
				
			||||||
| 
						 | 
					@ -144,29 +144,29 @@
 | 
				
			||||||
        </tbody>
 | 
					        </tbody>
 | 
				
			||||||
        <tfoot>
 | 
					        <tfoot>
 | 
				
			||||||
          <tr class="total-section">
 | 
					          <tr class="total-section">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>جمع کل(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>جمع کل(ریال):</strong></td>
 | 
				
			||||||
            <td><strong>{{ invoice.total_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong>{{ invoice.total_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
          {% if invoice.discount_amount > 0 %}
 | 
					          {% if invoice.discount_amount > 0 %}
 | 
				
			||||||
          <tr class="total-section">
 | 
					          <tr class="total-section">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>تخفیف(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>تخفیف(ریال):</strong></td>
 | 
				
			||||||
            <td><strong>{{ invoice.discount_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong>{{ invoice.discount_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
          {% endif %}
 | 
					          {% endif %}
 | 
				
			||||||
          <tr class="total-section">
 | 
					          <tr class="total-section">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>مالیات بر ارزش افزوده(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>مالیات بر ارزش افزوده(ریال):</strong></td>
 | 
				
			||||||
            <td><strong>{{ invoice.get_vat_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong>{{ invoice.get_vat_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
          <tr class="total-section border-top border-2">
 | 
					          <tr class="total-section border-top border-2">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>مبلغ نهایی (شامل مالیات)(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>مبلغ نهایی (شامل مالیات)(ریال):</strong></td>
 | 
				
			||||||
            <td><strong>{{ invoice.final_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong>{{ invoice.final_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
          <tr class="total-section">
 | 
					          <tr class="total-section">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>پرداختیها(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>پرداختیها(ریال):</strong></td>
 | 
				
			||||||
            <td><strong">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
          <tr class="total-section">
 | 
					          <tr class="total-section">
 | 
				
			||||||
            <td colspan="5" class="text-end"><strong>مانده(تومان):</strong></td>
 | 
					            <td colspan="5" class="text-end"><strong>مانده(ریال):</strong></td>
 | 
				
			||||||
            <td><strong>{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					            <td><strong>{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
          </tr>
 | 
					          </tr>
 | 
				
			||||||
        </tfoot>
 | 
					        </tfoot>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,19 +68,19 @@
 | 
				
			||||||
            <div class="col-6 col-md-3">
 | 
					            <div class="col-6 col-md-3">
 | 
				
			||||||
              <div class="border rounded p-3 h-100">
 | 
					              <div class="border rounded p-3 h-100">
 | 
				
			||||||
                <div class="small text-muted">مبلغ نهایی (با مالیات)</div>
 | 
					                <div class="small text-muted">مبلغ نهایی (با مالیات)</div>
 | 
				
			||||||
                <div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                <div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="col-6 col-md-3">
 | 
					            <div class="col-6 col-md-3">
 | 
				
			||||||
              <div class="border rounded p-3 h-100">
 | 
					              <div class="border rounded p-3 h-100">
 | 
				
			||||||
                <div class="small text-muted">پرداختیها</div>
 | 
					                <div class="small text-muted">پرداختیها</div>
 | 
				
			||||||
                <div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                <div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="col-6 col-md-3">
 | 
					            <div class="col-6 col-md-3">
 | 
				
			||||||
              <div class="border rounded p-3 h-100">
 | 
					              <div class="border rounded p-3 h-100">
 | 
				
			||||||
                <div class="small text-muted">مانده</div>
 | 
					                <div class="small text-muted">مانده</div>
 | 
				
			||||||
                <div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                <div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div class="col-6 col-md-3 d-flex align-items-center">
 | 
					            <div class="col-6 col-md-3 d-flex align-items-center">
 | 
				
			||||||
| 
						 | 
					@ -100,8 +100,8 @@
 | 
				
			||||||
                  <th class="text-center">افزوده</th>
 | 
					                  <th class="text-center">افزوده</th>
 | 
				
			||||||
                  <th class="text-center">حذف</th>
 | 
					                  <th class="text-center">حذف</th>
 | 
				
			||||||
                  <th class="text-center">تعداد نهایی</th>
 | 
					                  <th class="text-center">تعداد نهایی</th>
 | 
				
			||||||
                  <th class="text-end">قیمت واحد (تومان)</th>
 | 
					                  <th class="text-end">قیمت واحد (ریال)</th>
 | 
				
			||||||
                  <th class="text-end">قیمت کل (تومان)</th>
 | 
					                  <th class="text-end">قیمت کل (ریال)</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
              </thead>
 | 
					              </thead>
 | 
				
			||||||
              <tbody>
 | 
					              <tbody>
 | 
				
			||||||
| 
						 | 
					@ -153,27 +153,27 @@
 | 
				
			||||||
              <tfoot>
 | 
					              <tfoot>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">مبلغ کل</th>
 | 
					                  <th colspan="6" class="text-end">مبلغ کل</th>
 | 
				
			||||||
                  <th class="text-end">{{ invoice.total_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end">{{ invoice.total_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">تخفیف</th>
 | 
					                  <th colspan="6" class="text-end">تخفیف</th>
 | 
				
			||||||
                  <th class="text-end">{{ invoice.discount_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end">{{ invoice.discount_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">مالیات بر ارزش افزوده</th>
 | 
					                  <th colspan="6" class="text-end">مالیات بر ارزش افزوده</th>
 | 
				
			||||||
                  <th class="text-end">{{ invoice.get_vat_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end">{{ invoice.get_vat_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">مبلغ نهایی (با مالیات)</th>
 | 
					                  <th colspan="6" class="text-end">مبلغ نهایی (با مالیات)</th>
 | 
				
			||||||
                  <th class="text-end">{{ invoice.final_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end">{{ invoice.final_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">پرداختیها</th>
 | 
					                  <th colspan="6" class="text-end">پرداختیها</th>
 | 
				
			||||||
                  <th class="text-end">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
                <tr>
 | 
					                <tr>
 | 
				
			||||||
                  <th colspan="6" class="text-end">مانده</th>
 | 
					                  <th colspan="6" class="text-end">مانده</th>
 | 
				
			||||||
                  <th class="text-end {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} تومان</th>
 | 
					                  <th class="text-end {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} ریال</th>
 | 
				
			||||||
                </tr>
 | 
					                </tr>
 | 
				
			||||||
              </tfoot>
 | 
					              </tfoot>
 | 
				
			||||||
            </table>
 | 
					            </table>
 | 
				
			||||||
| 
						 | 
					@ -227,7 +227,7 @@
 | 
				
			||||||
            </select>
 | 
					            </select>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="mb-3">
 | 
					          <div class="mb-3">
 | 
				
			||||||
            <label class="form-label">مبلغ (تومان)</label>
 | 
					            <label class="form-label">مبلغ (ریال)</label>
 | 
				
			||||||
            <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_charge_amount" dir="ltr" autocomplete="off" required>
 | 
					            <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_charge_amount" dir="ltr" autocomplete="off" required>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -75,7 +75,7 @@
 | 
				
			||||||
                  </select>
 | 
					                  </select>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="mb-3">
 | 
					                <div class="mb-3">
 | 
				
			||||||
                  <label class="form-label">مبلغ (تومان)</label>
 | 
					                  <label class="form-label">مبلغ (ریال)</label>
 | 
				
			||||||
                  <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_amount" dir="ltr" autocomplete="off" required>
 | 
					                  <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_amount" dir="ltr" autocomplete="off" required>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="mb-3">
 | 
					                <div class="mb-3">
 | 
				
			||||||
| 
						 | 
					@ -122,19 +122,19 @@
 | 
				
			||||||
                <div class="col-6 col-md-4">
 | 
					                <div class="col-6 col-md-4">
 | 
				
			||||||
                  <div class="border rounded p-3 h-100">
 | 
					                  <div class="border rounded p-3 h-100">
 | 
				
			||||||
                    <div class="small text-muted">مبلغ نهایی (با مالیات)</div>
 | 
					                    <div class="small text-muted">مبلغ نهایی (با مالیات)</div>
 | 
				
			||||||
                    <div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                    <div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                  </div>
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-6 col-md-4">
 | 
					                <div class="col-6 col-md-4">
 | 
				
			||||||
                  <div class="border rounded p-3 h-100">
 | 
					                  <div class="border rounded p-3 h-100">
 | 
				
			||||||
                    <div class="small text-muted">پرداختیها</div>
 | 
					                    <div class="small text-muted">پرداختیها</div>
 | 
				
			||||||
                    <div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                    <div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                  </div>
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-6 col-md-4">
 | 
					                <div class="col-6 col-md-4">
 | 
				
			||||||
                  <div class="border rounded p-3 h-100">
 | 
					                  <div class="border rounded p-3 h-100">
 | 
				
			||||||
                    <div class="small text-muted">مانده</div>
 | 
					                    <div class="small text-muted">مانده</div>
 | 
				
			||||||
                    <div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                    <div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                  </div>
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="col-6 d-flex align-items-center">
 | 
					                <div class="col-6 d-flex align-items-center">
 | 
				
			||||||
| 
						 | 
					@ -166,7 +166,7 @@
 | 
				
			||||||
                  {% for p in payments %}
 | 
					                  {% for p in payments %}
 | 
				
			||||||
                  <tr>
 | 
					                  <tr>
 | 
				
			||||||
                    <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
					                    <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
				
			||||||
                    <td>{{ p.amount|floatformat:0|intcomma:False }} تومان</td>
 | 
					                    <td>{{ p.amount|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                    <td>{{ p.jpayment_date }}</td>
 | 
					                    <td>{{ p.jpayment_date }}</td>
 | 
				
			||||||
                    <td>{{ p.get_payment_method_display }}</td>
 | 
					                    <td>{{ p.get_payment_method_display }}</td>
 | 
				
			||||||
                    <td>{{ p.reference_number|default:'-' }}</td>
 | 
					                    <td>{{ p.reference_number|default:'-' }}</td>
 | 
				
			||||||
| 
						 | 
					@ -320,7 +320,7 @@
 | 
				
			||||||
        <div class="modal-body">
 | 
					        <div class="modal-body">
 | 
				
			||||||
          {% if invoice.get_remaining_amount != 0 %}
 | 
					          {% if invoice.get_remaining_amount != 0 %}
 | 
				
			||||||
            <div class="alert alert-warning" role="alert">
 | 
					            <div class="alert alert-warning" role="alert">
 | 
				
			||||||
              مانده فاکتور: <strong>{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} تومان</strong><br>
 | 
					              مانده فاکتور: <strong>{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} ریال</strong><br>
 | 
				
			||||||
              امکان تایید تا تسویه کامل فاکتور وجود ندارد.
 | 
					              امکان تایید تا تسویه کامل فاکتور وجود ندارد.
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          {% else %}
 | 
					          {% else %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -71,7 +71,7 @@
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    <div class="card-body">
 | 
					                    <div class="card-body">
 | 
				
			||||||
                      <div class="mb-3">
 | 
					                      <div class="mb-3">
 | 
				
			||||||
                        <label class="form-label">مبلغ (تومان)</label>
 | 
					                        <label class="form-label">مبلغ (ریال)</label>
 | 
				
			||||||
                        <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_amount" dir="ltr" autocomplete="off" required>
 | 
					                        <input type="text" inputmode="numeric" pattern="\d*" class="form-control" name="amount" id="id_amount" dir="ltr" autocomplete="off" required>
 | 
				
			||||||
                      </div>
 | 
					                      </div>
 | 
				
			||||||
                      <div class="mb-3">
 | 
					                      <div class="mb-3">
 | 
				
			||||||
| 
						 | 
					@ -117,19 +117,19 @@
 | 
				
			||||||
                        <div class="col-6">
 | 
					                        <div class="col-6">
 | 
				
			||||||
                          <div class="border rounded p-3">
 | 
					                          <div class="border rounded p-3">
 | 
				
			||||||
                            <div class="small text-muted">مبلغ نهایی پیشفاکتور (با مالیات)</div>
 | 
					                            <div class="small text-muted">مبلغ نهایی پیشفاکتور (با مالیات)</div>
 | 
				
			||||||
                            <div class="h5 mt-1">{{ totals.final_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                            <div class="h5 mt-1">{{ totals.final_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                          </div>
 | 
					                          </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="col-6">
 | 
					                        <div class="col-6">
 | 
				
			||||||
                          <div class="border rounded p-3">
 | 
					                          <div class="border rounded p-3">
 | 
				
			||||||
                            <div class="small text-muted">مبلغ پرداختشده</div>
 | 
					                            <div class="small text-muted">مبلغ پرداختشده</div>
 | 
				
			||||||
                            <div class="h5 mt-1 text-success">{{ totals.paid_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                            <div class="h5 mt-1 text-success">{{ totals.paid_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                          </div>
 | 
					                          </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="col-6">
 | 
					                        <div class="col-6">
 | 
				
			||||||
                          <div class="border rounded p-3">
 | 
					                          <div class="border rounded p-3">
 | 
				
			||||||
                            <div class="small text-muted">مانده</div>
 | 
					                            <div class="small text-muted">مانده</div>
 | 
				
			||||||
                            <div class="h5 mt-1 {% if totals.is_fully_paid %}text-success{% else %}text-danger{% endif %}">{{ totals.remaining_amount|floatformat:0|intcomma:False }} تومان</div>
 | 
					                            <div class="h5 mt-1 {% if totals.is_fully_paid %}text-success{% else %}text-danger{% endif %}">{{ totals.remaining_amount|floatformat:0|intcomma:False }} ریال</div>
 | 
				
			||||||
                          </div>
 | 
					                          </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                        <div class="col-6 d-flex align-items-center">
 | 
					                        <div class="col-6 d-flex align-items-center">
 | 
				
			||||||
| 
						 | 
					@ -165,7 +165,7 @@
 | 
				
			||||||
                          {% for p in payments %}
 | 
					                          {% for p in payments %}
 | 
				
			||||||
                          <tr>
 | 
					                          <tr>
 | 
				
			||||||
                            <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
					                            <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
				
			||||||
                            <td class="{% if p.direction == 'in' %}text-success{% else %}text-danger{% endif %}">{{ p.amount|floatformat:0|intcomma:False }} تومان</td>
 | 
					                            <td class="{% if p.direction == 'in' %}text-success{% else %}text-danger{% endif %}">{{ p.amount|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                            <td>{{ p.jpayment_date }}</td>
 | 
					                            <td>{{ p.jpayment_date }}</td>
 | 
				
			||||||
                            <td>{{ p.get_payment_method_display }}</td>
 | 
					                            <td>{{ p.get_payment_method_display }}</td>
 | 
				
			||||||
                            <td>{{ p.reference_number|default:'-' }}</td>
 | 
					                            <td>{{ p.reference_number|default:'-' }}</td>
 | 
				
			||||||
| 
						 | 
					@ -301,7 +301,7 @@
 | 
				
			||||||
          {% if not totals.is_fully_paid %}
 | 
					          {% if not totals.is_fully_paid %}
 | 
				
			||||||
            <div class="alert alert-warning" role="alert">
 | 
					            <div class="alert alert-warning" role="alert">
 | 
				
			||||||
              مبلغی از پیشفاکتور هنوز پرداخت نشده است.
 | 
					              مبلغی از پیشفاکتور هنوز پرداخت نشده است.
 | 
				
			||||||
              <div class="mt-1">مانده: <strong>{{ totals.remaining_amount|floatformat:0|intcomma:False }} تومان</strong></div>
 | 
					              <div class="mt-1">مانده: <strong>{{ totals.remaining_amount|floatformat:0|intcomma:False }} ریال</strong></div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            آیا مطمئن هستید که میخواهید مرحله را تایید کنید؟
 | 
					            آیا مطمئن هستید که میخواهید مرحله را تایید کنید؟
 | 
				
			||||||
          {% else %}
 | 
					          {% else %}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -200,9 +200,9 @@
 | 
				
			||||||
              <tr>
 | 
					              <tr>
 | 
				
			||||||
                <td class="text-nowrap">{{ quote_item.item.name }}</td>
 | 
					                <td class="text-nowrap">{{ quote_item.item.name }}</td>
 | 
				
			||||||
                <td class="text-nowrap">{{ quote_item.item.description|default:"-" }}</td>
 | 
					                <td class="text-nowrap">{{ quote_item.item.description|default:"-" }}</td>
 | 
				
			||||||
                <td>{{ quote_item.unit_price|floatformat:0|intcomma:False }} تومان</td>
 | 
					                <td>{{ quote_item.unit_price|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                <td>{{ quote_item.quantity }}</td>
 | 
					                <td>{{ quote_item.quantity }}</td>
 | 
				
			||||||
                <td>{{ quote_item.total_price|floatformat:0|intcomma:False }} تومان</td>
 | 
					                <td>{{ quote_item.total_price|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
              </tr>
 | 
					              </tr>
 | 
				
			||||||
              {% endfor %}
 | 
					              {% endfor %}
 | 
				
			||||||
              <tr>
 | 
					              <tr>
 | 
				
			||||||
| 
						 | 
					@ -217,12 +217,12 @@
 | 
				
			||||||
                  <p class="mb-0 fw-bold">مبلغ نهایی (شامل مالیات):</p>
 | 
					                  <p class="mb-0 fw-bold">مبلغ نهایی (شامل مالیات):</p>
 | 
				
			||||||
                </td>
 | 
					                </td>
 | 
				
			||||||
                <td class="px-4 py-5">
 | 
					                <td class="px-4 py-5">
 | 
				
			||||||
                  <p class="fw-medium mb-2">{{ quote.total_amount|floatformat:0|intcomma:False }} تومان</p>
 | 
					                  <p class="fw-medium mb-2">{{ quote.total_amount|floatformat:0|intcomma:False }} ریال</p>
 | 
				
			||||||
                  {% if quote.discount_amount > 0 %}
 | 
					                  {% if quote.discount_amount > 0 %}
 | 
				
			||||||
                  <p class="fw-medium mb-2">{{ quote.discount_amount|floatformat:0|intcomma:False }} تومان</p>
 | 
					                  <p class="fw-medium mb-2">{{ quote.discount_amount|floatformat:0|intcomma:False }} ریال</p>
 | 
				
			||||||
                  {% endif %}
 | 
					                  {% endif %}
 | 
				
			||||||
                  <p class="fw-medium mb-2">{{ quote.get_vat_amount|floatformat:0|intcomma:False }} تومان</p>
 | 
					                  <p class="fw-medium mb-2">{{ quote.get_vat_amount|floatformat:0|intcomma:False }} ریال</p>
 | 
				
			||||||
                  <p class="fw-bold mb-0">{{ quote.final_amount|floatformat:0|intcomma:False }} تومان</p>
 | 
					                  <p class="fw-bold mb-0">{{ quote.final_amount|floatformat:0|intcomma:False }} ریال</p>
 | 
				
			||||||
                </td>
 | 
					                </td>
 | 
				
			||||||
              </tr>
 | 
					              </tr>
 | 
				
			||||||
            </tbody>
 | 
					            </tbody>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -185,8 +185,8 @@
 | 
				
			||||||
                        <th style="width: 30%">شرح کالا/خدمات</th>
 | 
					                        <th style="width: 30%">شرح کالا/خدمات</th>
 | 
				
			||||||
                        <th style="width: 30%">توضیحات</th>
 | 
					                        <th style="width: 30%">توضیحات</th>
 | 
				
			||||||
                        <th style="width: 10%">تعداد</th>
 | 
					                        <th style="width: 10%">تعداد</th>
 | 
				
			||||||
                        <th style="width: 12.5%">قیمت واحد(تومان)</th>
 | 
					                        <th style="width: 12.5%">قیمت واحد(ریال)</th>
 | 
				
			||||||
                        <th style="width: 12.5%">قیمت کل(تومان)</th>
 | 
					                        <th style="width: 12.5%">قیمت کل(ریال)</th>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                </thead>
 | 
					                </thead>
 | 
				
			||||||
                <tbody>
 | 
					                <tbody>
 | 
				
			||||||
| 
						 | 
					@ -203,21 +203,21 @@
 | 
				
			||||||
                </tbody>
 | 
					                </tbody>
 | 
				
			||||||
                <tfoot>
 | 
					                <tfoot>
 | 
				
			||||||
                    <tr class="total-section">
 | 
					                    <tr class="total-section">
 | 
				
			||||||
                        <td colspan="5" class="text-end"><strong>جمع کل(تومان):</strong></td>
 | 
					                        <td colspan="5" class="text-end"><strong>جمع کل(ریال):</strong></td>
 | 
				
			||||||
                        <td><strong>{{ quote.total_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					                        <td><strong>{{ quote.total_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                    {% if quote.discount_amount > 0 %}
 | 
					                    {% if quote.discount_amount > 0 %}
 | 
				
			||||||
                    <tr class="total-section">
 | 
					                    <tr class="total-section">
 | 
				
			||||||
                        <td colspan="5" class="text-end"><strong>تخفیف(تومان):</strong></td>
 | 
					                        <td colspan="5" class="text-end"><strong>تخفیف(ریال):</strong></td>
 | 
				
			||||||
                        <td><strong>{{ quote.discount_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					                        <td><strong>{{ quote.discount_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                    {% endif %}
 | 
					                    {% endif %}
 | 
				
			||||||
                    <tr class="total-section">
 | 
					                    <tr class="total-section">
 | 
				
			||||||
                        <td colspan="5" class="text-end"><strong>مالیات بر ارزش افزوده(تومان):</strong></td>
 | 
					                        <td colspan="5" class="text-end"><strong>مالیات بر ارزش افزوده(ریال):</strong></td>
 | 
				
			||||||
                        <td><strong>{{ quote.get_vat_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					                        <td><strong>{{ quote.get_vat_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                    <tr class="total-section border-top border-2">
 | 
					                    <tr class="total-section border-top border-2">
 | 
				
			||||||
                        <td colspan="5" class="text-end"><strong>مبلغ نهایی (با مالیات)(تومان):</strong></td>
 | 
					                        <td colspan="5" class="text-end"><strong>مبلغ نهایی (با مالیات)(ریال):</strong></td>
 | 
				
			||||||
                        <td><strong>{{ quote.final_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
					                        <td><strong>{{ quote.final_amount|floatformat:0|intcomma:False }}</strong></td>
 | 
				
			||||||
                    </tr>
 | 
					                    </tr>
 | 
				
			||||||
                </tfoot>
 | 
					                </tfoot>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,7 +57,7 @@
 | 
				
			||||||
                  <div class="alert alert-info">
 | 
					                  <div class="alert alert-info">
 | 
				
			||||||
                    <h6>پیشفاکتور موجود</h6>
 | 
					                    <h6>پیشفاکتور موجود</h6>
 | 
				
			||||||
                    <span class="mb-1">{{ existing_quote.name }} | </span>
 | 
					                    <span class="mb-1">{{ existing_quote.name }} | </span>
 | 
				
			||||||
                    <span class="mb-1">مبلغ کل (با احتساب مالیات): {{ existing_quote.final_amount|floatformat:0|intcomma:False }} تومان | </span>
 | 
					                    <span class="mb-1">مبلغ کل (با احتساب مالیات): {{ existing_quote.final_amount|floatformat:0|intcomma:False }} ریال | </span>
 | 
				
			||||||
                    <span class="mb-0">وضعیت: {{ existing_quote.get_status_display_with_color|safe }}</span>
 | 
					                    <span class="mb-0">وضعیت: {{ existing_quote.get_status_display_with_color|safe }}</span>
 | 
				
			||||||
                  </div>
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
| 
						 | 
					@ -97,7 +97,7 @@
 | 
				
			||||||
                              {% if item.description %}<small class="text-muted">{{ item.description }}</small>{% endif %}
 | 
					                              {% if item.description %}<small class="text-muted">{{ item.description }}</small>{% endif %}
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                          </td>
 | 
					                          </td>
 | 
				
			||||||
                          <td>{{ item.unit_price|floatformat:0|intcomma:False }} تومان</td>
 | 
					                          <td>{{ item.unit_price|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                          <td>
 | 
					                          <td>
 | 
				
			||||||
                            <input type="number" class="form-control form-control-sm quote-item-qty" min="1"
 | 
					                            <input type="number" class="form-control form-control-sm quote-item-qty" min="1"
 | 
				
			||||||
                                   data-item-id="{{ item.id }}"
 | 
					                                   data-item-id="{{ item.id }}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,9 +56,9 @@
 | 
				
			||||||
            <div class="card-body">
 | 
					            <div class="card-body">
 | 
				
			||||||
              {% if invoice %}
 | 
					              {% if invoice %}
 | 
				
			||||||
              <div class="row g-3 mb-3">
 | 
					              <div class="row g-3 mb-3">
 | 
				
			||||||
                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">مبلغ نهایی</div><div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} تومان</div></div></div>
 | 
					                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">مبلغ نهایی</div><div class="h5 mt-1">{{ invoice.final_amount|floatformat:0|intcomma:False }} ریال</div></div></div>
 | 
				
			||||||
                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">پرداختیها</div><div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} تومان</div></div></div>
 | 
					                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">پرداختیها</div><div class="h5 mt-1 text-success">{{ invoice.get_paid_amount|floatformat:0|intcomma:False }} ریال</div></div></div>
 | 
				
			||||||
                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">مانده</div><div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} تومان</div></div></div>
 | 
					                <div class="col-6 col-md-3"><div class="border rounded p-3 h-100"><div class="small text-muted">مانده</div><div class="h5 mt-1 {% if invoice.get_remaining_amount <= 0 %}text-success{% else %}text-danger{% endif %}">{{ invoice.get_remaining_amount|floatformat:0|intcomma:False }} ریال</div></div></div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
              <div class="table-responsive">
 | 
					              <div class="table-responsive">
 | 
				
			||||||
                <table class="table table-striped mb-0">
 | 
					                <table class="table table-striped mb-0">
 | 
				
			||||||
| 
						 | 
					@ -237,7 +237,7 @@
 | 
				
			||||||
                    {% for p in payments %}
 | 
					                    {% for p in payments %}
 | 
				
			||||||
                    <tr>
 | 
					                    <tr>
 | 
				
			||||||
                      <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
					                      <td>{% if p.direction == 'in' %}<span class="badge bg-success">دریافتی{% else %}<span class="badge bg-warning text-dark">پرداختی{% endif %}</span></td>
 | 
				
			||||||
                      <td>{{ p.amount|floatformat:0|intcomma:False }} تومان</td>
 | 
					                      <td>{{ p.amount|floatformat:0|intcomma:False }} ریال</td>
 | 
				
			||||||
                      <td>{{ p.payment_date|date:'Y/m/d' }}</td>
 | 
					                      <td>{{ p.payment_date|date:'Y/m/d' }}</td>
 | 
				
			||||||
                      <td>{{ p.get_payment_method_display }}</td>
 | 
					                      <td>{{ p.get_payment_method_display }}</td>
 | 
				
			||||||
                      <td>{{ p.reference_number|default:'-' }}</td>
 | 
					                      <td>{{ p.reference_number|default:'-' }}</td>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue