+ Timeout logout
+ Pred kreiranjem povpraševanja vprašaj za partnerja + Prikaz TOP 100 (predolgo nalaga) + Dodaj Sorovec na Urejanje Artikla (zadnji surovec) + V Urejanju artikla popravi opis v pot dokumentov + Kooperant
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
case 3:
|
||||
<i>Naročila kupcev</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Kooperacije</i>
|
||||
break;
|
||||
default:
|
||||
<i>Fakture</i>
|
||||
break;
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
case 3:
|
||||
<i>Naročila kupcev</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Kooperacije</i>
|
||||
break;
|
||||
default:
|
||||
<i>Fakture</i>
|
||||
break;
|
||||
@@ -145,6 +148,9 @@
|
||||
case 3:
|
||||
<i>Naročilo kupca</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Kooperacija</i>
|
||||
break;
|
||||
default:
|
||||
<i>Faktura</i>
|
||||
break;
|
||||
|
||||
@@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using EveryThing.Models.Project;
|
||||
using System.Text.Json;
|
||||
using EveryThing.Models.Invoice;
|
||||
using static EveryThing.Pages.Projects.EditModel;
|
||||
|
||||
namespace EveryThing.Pages.Invoices
|
||||
@@ -106,10 +107,26 @@ namespace EveryThing.Pages.Invoices
|
||||
return Page();
|
||||
}
|
||||
|
||||
//var oldInvoice = _context.Invoices.FirstOrDefault(x => x.IdInvoice == Invoice.IdInvoice);
|
||||
|
||||
var statusChanged = true;//oldInvoice == null || oldInvoice.State != Invoice.State;
|
||||
|
||||
Invoice.PostText = Invoice.PostText.Replace("<div><br></div>", "");
|
||||
Invoice.PreText = Invoice.PreText.Replace("<div><br></div>", "");
|
||||
|
||||
_context.Attach(Invoice).State = EntityState.Modified;
|
||||
|
||||
if (Invoice.Type == Invoice.InvoiceType.Cooperation
|
||||
&& statusChanged
|
||||
&& Invoice.State == Invoice.InvoiceState.Closed)
|
||||
{
|
||||
await _context.InvoiceItems
|
||||
.Where(x => x.IdInvoiceFk == Invoice.IdInvoice)
|
||||
.Include(invoiceItem => invoiceItem.ProjectPartItem).ForEachAsync(x =>
|
||||
{
|
||||
x.ProjectPartItem.Status = ProjectPartItemStatus.Finished;
|
||||
});
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
case 3:
|
||||
<i>Naročila kupcev</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Kooperacije</i>
|
||||
break;
|
||||
default:
|
||||
<i>Fakture</i>
|
||||
break;
|
||||
@@ -127,7 +130,27 @@
|
||||
</table>
|
||||
|
||||
<div class="card-footer py-3 text-right">
|
||||
<a asp-page="Create" asp-route-type="@ViewData["Type"]" class="btn btn-primary">Vnos fakture</a>
|
||||
<a asp-page="Create" asp-route-type="@ViewData["Type"]" class="btn btn-primary">@switch (@ViewData["Type"])
|
||||
{
|
||||
case 1:
|
||||
<i>Vnos naročila dobaviteljem</i>
|
||||
break;
|
||||
case 0:
|
||||
<i>Vnos računa</i>
|
||||
break;
|
||||
case 2:
|
||||
<i>Vnos dobavnice</i>
|
||||
break;
|
||||
case 3:
|
||||
<i>Vnos naročila kupcev</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Vnos kooperacije</i>
|
||||
break;
|
||||
default:
|
||||
<i>Vnos fakture</i>
|
||||
break;
|
||||
}</a>
|
||||
</div>
|
||||
</div>
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@@ -50,6 +50,9 @@
|
||||
case 3:
|
||||
<i>Naročila kupcev</i>
|
||||
break;
|
||||
case 4:
|
||||
<i>Kooperacija</i>
|
||||
break;
|
||||
default:
|
||||
<i>Fakture</i>
|
||||
break;
|
||||
|
||||
@@ -172,6 +172,9 @@ namespace EveryThing.Pages.Invoices
|
||||
case Invoice.InvoiceType.DeliveryNote:
|
||||
Translation.InvoiceType = "Dobavnica";
|
||||
break;
|
||||
case Invoice.InvoiceType.Cooperation:
|
||||
Translation.InvoiceType = "Kooperacija";
|
||||
break;
|
||||
default:
|
||||
Translation.InvoiceType = "Faktura";
|
||||
break;
|
||||
@@ -231,6 +234,9 @@ namespace EveryThing.Pages.Invoices
|
||||
case Invoice.InvoiceType.DeliveryNote:
|
||||
Translation.InvoiceType = "Lieferschein";
|
||||
break;
|
||||
case Invoice.InvoiceType.Cooperation:
|
||||
Translation.InvoiceType = "Zusammenarbeit";
|
||||
break;
|
||||
default:
|
||||
Translation.InvoiceType = "Faktura";
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user