diff --git a/Back/Back.csproj b/Back/Back.csproj index fd97cd7..899d7e4 100644 --- a/Back/Back.csproj +++ b/Back/Back.csproj @@ -36,7 +36,7 @@ - ..\..\Dlls\Service.dll + ..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll diff --git a/Back/Data/Infrastructure/Persistence/SqlDbContext.cs b/Back/Data/Infrastructure/Persistence/SqlDbContext.cs index ebc37fc..6776274 100644 --- a/Back/Data/Infrastructure/Persistence/SqlDbContext.cs +++ b/Back/Data/Infrastructure/Persistence/SqlDbContext.cs @@ -49,6 +49,7 @@ namespace TaxPayer.Infrastructure.Persistence public DbSet rptQueue { get; set; } public DbSet Promotions { get; set; } public DbSet PromotionDetails { get; set; } + public DbSet CreditDocuments { get; set; } #endregion //public override Task SaveChangesAsync(CancellationToken cancellationToken = new CancellationToken()) //{ diff --git a/Back/Data/Models/Company.cs b/Back/Data/Models/Company.cs index 02b98fd..1575286 100644 --- a/Back/Data/Models/Company.cs +++ b/Back/Data/Models/Company.cs @@ -14,6 +14,7 @@ public byte[]? Logo { get; set; } public string RegisterDate { get; set; } public bool IsActive { get; set; } + public decimal Credit { get; set; } = 0; #region Navigation public virtual ICollection CODItemS { get; set; } @@ -21,6 +22,7 @@ public virtual ICollection PermissionPeriods { get; set; } public virtual ICollection Customers { get; set; } public virtual ICollection invoices { get; set; } + public virtual ICollection CreditDocuments { get; set; } #endregion } } diff --git a/Back/Data/Models/CreditDocuments.cs b/Back/Data/Models/CreditDocuments.cs new file mode 100644 index 0000000..ce5e4ea --- /dev/null +++ b/Back/Data/Models/CreditDocuments.cs @@ -0,0 +1,19 @@ +using Shared.Enums; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Back.Data.Models +{ + public class CreditDocuments + { + public int ID { get; set; } + public int CompanyID { get; set; } + public string Date { get; set; } + public string Title { get; set; } + public CreditDocumentType type { get; set; } + public decimal Value { get; set; } + + + [ForeignKey("CompanyID")] + public virtual Company company { get; set; } + } +} diff --git a/Back/Data/Models/Invoice.cs b/Back/Data/Models/Invoice.cs index 76166ec..4703ebc 100644 --- a/Back/Data/Models/Invoice.cs +++ b/Back/Data/Models/Invoice.cs @@ -181,7 +181,6 @@ namespace Back.Data.Models [ForeignKey("PatternID")] public virtual Pattern? pattern { get; set; } [ForeignKey("CompanyID")] - [JsonIgnore] public virtual Company? company { get; set; } public object Clone() diff --git a/Shared/Enums/CreditDocumentType.cs b/Shared/Enums/CreditDocumentType.cs new file mode 100644 index 0000000..27e0e50 --- /dev/null +++ b/Shared/Enums/CreditDocumentType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Shared.Enums +{ + public enum CreditDocumentType + { + Increase,Decrease + } +} diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index 51b062c..fa71b7a 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -6,13 +6,4 @@ enable - - - ..\..\Dlls\stimull\Stimulsoft.Base.dll - - - ..\..\Dlls\stimull\Stimulsoft.Report.dll - - - diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs index ea0270a..670070e 100644 --- a/TaxPayerFull/Program.cs +++ b/TaxPayerFull/Program.cs @@ -37,10 +37,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO() //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") }); //Home -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); +//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") }); //farzan -//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");