Spaces:
Sleeping
Sleeping
Download ViewModels/PurchaseCreateViewModel.cs from azizproject/Oilshop: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/spaces/azizproject/Oilshop/resolve/main/ViewModels/PurchaseCreateViewModel.cs
- Command line
-
hf download hf://spaces/azizproject/Oilshop/ViewModels/PurchaseCreateViewModel.cs
-
curl -L -o PurchaseCreateViewModel.cs https://huggingface.co/spaces/azizproject/Oilshop/resolve/main/ViewModels/PurchaseCreateViewModel.cs
1.52 kB
| using Microsoft.AspNetCore.Mvc.Rendering; | |
| using OilShopManagement.Models; | |
| using System.ComponentModel.DataAnnotations; | |
| namespace OilShopManagement.ViewModels; | |
| public class PurchaseCreateViewModel | |
| { | |
| public int? SupplierId { get; set; } | |
| public string? SupplierName { get; set; } | |
| [] | |
| public DateTime PurchaseDate { get; set; } = DateTime.UtcNow; | |
| [] | |
| public PaymentMethod PaymentMethod { get; set; } = PaymentMethod.Cash; | |
| [] | |
| [] | |
| public decimal TaxRate { get; set; } = 0; | |
| [] | |
| [] | |
| public decimal Discount { get; set; } = 0; | |
| [] | |
| [] | |
| public string? Notes { get; set; } | |
| public decimal? ManualSubTotal { get; set; } | |
| public List<PurchaseItemViewModel> Items { get; set; } = []; | |
| public SelectList? Suppliers { get; set; } | |
| } | |
| public class PurchaseItemViewModel | |
| { | |
| public int ProductId { get; set; } | |
| public string ProductName { get; set; } = string.Empty; | |
| public int Quantity { get; set; } // always in pieces for carton products | |
| public decimal UnitPrice { get; set; } // always piece price | |
| public decimal Total { get; set; } | |
| public int PiecesPerUnit { get; set; } // > 0 means carton product | |
| } | |