Fixed error of display with price of product in all documents

This commit is contained in:
2026-05-25 16:38:33 +01:00
parent 48b9db6e1c
commit 3cb619cfa6
12 changed files with 2128 additions and 27 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,50 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PyroFetes.Migrations
{
/// <inheritdoc />
public partial class AddedMissingFieldForSupplierInDeliveryNote : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "SupplierId",
table: "DeliveryNotes",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateIndex(
name: "IX_DeliveryNotes_SupplierId",
table: "DeliveryNotes",
column: "SupplierId");
migrationBuilder.AddForeignKey(
name: "FK_DeliveryNotes_Suppliers_SupplierId",
table: "DeliveryNotes",
column: "SupplierId",
principalTable: "Suppliers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DeliveryNotes_Suppliers_SupplierId",
table: "DeliveryNotes");
migrationBuilder.DropIndex(
name: "IX_DeliveryNotes_SupplierId",
table: "DeliveryNotes");
migrationBuilder.DropColumn(
name: "SupplierId",
table: "DeliveryNotes");
}
}
}
@@ -329,6 +329,9 @@ namespace PyroFetes.Migrations
b.Property<DateOnly?>("RealDeliveryDate")
.HasColumnType("date");
b.Property<int>("SupplierId")
.HasColumnType("int");
b.Property<string>("TrackingNumber")
.IsRequired()
.HasMaxLength(100)
@@ -338,6 +341,8 @@ namespace PyroFetes.Migrations
b.HasIndex("DelivererId");
b.HasIndex("SupplierId");
b.ToTable("DeliveryNotes");
});
@@ -1353,7 +1358,15 @@ namespace PyroFetes.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("PyroFetes.Models.Supplier", "Supplier")
.WithMany("DeliveryNotes")
.HasForeignKey("SupplierId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Deliverer");
b.Navigation("Supplier");
});
modelBuilder.Entity("PyroFetes.Models.ExperienceLevel", b =>
@@ -1969,6 +1982,8 @@ namespace PyroFetes.Migrations
modelBuilder.Entity("PyroFetes.Models.Supplier", b =>
{
b.Navigation("DeliveryNotes");
b.Navigation("Prices");
b.Navigation("PurchaseOrders");