status, pa material na artikel
This commit is contained in:
@@ -9,17 +9,34 @@ using EveryThing.Models.Invoice;
|
||||
|
||||
namespace EveryThing.Models.Project
|
||||
{
|
||||
public class ProjectPartItemStatusAttribute : Attribute
|
||||
{
|
||||
public int Order { get; set; }
|
||||
|
||||
public ProjectPartItemStatusAttribute(int order)
|
||||
{
|
||||
Order = order;
|
||||
}
|
||||
}
|
||||
public enum ProjectPartItemStatus
|
||||
{
|
||||
[ProjectPartItemStatus(1)]
|
||||
[Display(Name = "Odprto")]
|
||||
Opened = 0,
|
||||
|
||||
[ProjectPartItemStatus(2)]
|
||||
[Display(Name = "V izdelavi")]
|
||||
InProduction = 1,
|
||||
|
||||
[ProjectPartItemStatus(3)]
|
||||
[Display(Name = "V koop.")]
|
||||
InCooperation = 10,
|
||||
|
||||
[ProjectPartItemStatus(4)]
|
||||
[Display(Name = "Zaključeno")]
|
||||
Finished = 2,
|
||||
|
||||
[ProjectPartItemStatus(5)]
|
||||
[Display(Name = "Odpremljeno")]
|
||||
Shipped = 3
|
||||
}
|
||||
|
||||
@@ -242,13 +242,15 @@ namespace EveryThing.Pages.Projects
|
||||
Discount = 0,
|
||||
IdInvoiceFk = idInvoice,
|
||||
IdProjectPartItem = projectPartItem.IdProjectPartItem,
|
||||
IdItemFk = projectPartItem.IdMaterialFk,
|
||||
ItemDescription = projectPartItem.MaterialDimensions,
|
||||
IdItemFk = projectPartItem.IdItemFk,
|
||||
ItemDescription = "",
|
||||
Note = "",
|
||||
Price = projectPartItem.MaterialPrice,
|
||||
Quantity = projectPartItem.NumberOfItems
|
||||
Quantity = projectPartItem.NumberOfItems * projectPartItem.NumberOfSets
|
||||
};
|
||||
_context.InvoiceItems.Add(newInvoiceItem);
|
||||
|
||||
projectPartItem.Status = ProjectPartItemStatus.InCooperation;
|
||||
}
|
||||
_context.SaveChanges();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user