Spaces:
Sleeping
Sleeping
File size: 1,477 Bytes
c2908d2 a19fd25 c2908d2 a19fd25 c2908d2 a19fd25 c2908d2 a19fd25 c2908d2 a19fd25 c2908d2 a19fd25 c2908d2 8ded86b | 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 | using Microsoft.AspNetCore.Mvc.Rendering;
using OilShopManagement.Models;
using System.ComponentModel.DataAnnotations;
namespace OilShopManagement.ViewModels;
public class InvoiceCreateViewModel
{
public int? CustomerId { get; set; }
public string? CustomerName { get; set; }
[Display(Name = "طھط§ط±ظٹط® ط§ظ„ظپط§طھظˆط±ط©")]
public DateTime InvoiceDate { get; set; } = DateTime.UtcNow;
[Display(Name = "ط·ط±ظٹظ‚ط© ط§ظ„ط¯ظپط¹")]
public PaymentMethod PaymentMethod { get; set; } = PaymentMethod.Cash;
[Display(Name = "ظ†ط³ط¨ط© ط§ظ„ط¶ط±ظٹط¨ط© (%)")]
[Range(0, 100)]
public decimal TaxRate { get; set; } = 15;
[Display(Name = "ط§ظ„ط®طµظ…")]
[Range(0, 999999)]
public decimal Discount { get; set; } = 0;
[StringLength(500)]
[Display(Name = "ظ…ظ„ط§طط¸ط§طھ")]
public string? Notes { get; set; }
public decimal? ManualSubTotal { get; set; }
public List<InvoiceItemViewModel> Items { get; set; } = [];
public SelectList? Customers { get; set; }
public SelectList? Products { get; set; }
}
public class InvoiceItemViewModel
{
public int ProductId { get; set; }
public string ProductName { get; set; } = string.Empty;
public int Quantity { get; set; }
public decimal UnitPrice { get; set; }
public decimal PurchasePrice { get; set; }
public decimal Total { get; set; }
}
|