Funktionstüchtig
This commit is contained in:
@@ -67,21 +67,19 @@ namespace CardmarketBot
|
||||
IWebElement element;
|
||||
try
|
||||
{
|
||||
element = cd.FindElement(By.XPath("/html/body/main/section/div[3]/div[3]/div[2]"));
|
||||
element = cd.FindElement(By.XPath("/html/body/main/section/div[3]/div[4]"));
|
||||
|
||||
string content = element.Text;
|
||||
|
||||
List<string> bereitsbearbeitet = _usedRepository.Query;
|
||||
string[] datas = content.Split("\r\n");
|
||||
|
||||
|
||||
for (int i = 0; i < datas.Length; i += 7)
|
||||
for (int i = 8; i < datas.Length; i += 7)
|
||||
{
|
||||
if (bereitsbearbeitet.Find(x => x.Equals(datas[i])) != null) continue;
|
||||
ids.Add(datas[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch(OpenQA.Selenium.NotFoundException ex)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ static class Helper
|
||||
{
|
||||
public enum Porto
|
||||
{
|
||||
FAILED,
|
||||
BRIEF085,
|
||||
BRIEF100,
|
||||
BRIEF160,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using ConsoleApp3.DataContracts;
|
||||
using System.Diagnostics;
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -57,11 +58,11 @@ namespace CardmarketBot
|
||||
//rechnung.InvoiceNumber = string.Format("RE-{0}", await GetNextInvoiceNumber()); => Should be done by services.
|
||||
rechnung.InvoiceDate = kunde.Bezahldatum;
|
||||
rechnung.Header = string.Format("Verkauf #{0}",kunde.BestellungID);
|
||||
rechnung.HeadText = "Sehr geehrte Damen und Herren," +
|
||||
"Wir stellen Ihnen für Ihre bestellung folgende Rechnung." +
|
||||
"Bitte Beachte, dass der Lieferdatum die Bestelldatum entspricht.";
|
||||
rechnung.HeadText = "Sehr geehrte Damen und Herren, " +
|
||||
"wir stellen Ihnen für ihre Bestellung folgende Rechnung. " +
|
||||
"Bitte Beachte, dass das Lieferdatum dem Bestelldatum entspricht.";
|
||||
rechnung.FootText = "Ihre Rechnung ist bereits über Cardmarket beglichen worden.";
|
||||
rechnung.TimeToPay = new DateTime(0);
|
||||
rechnung.TimeToPay = new DateTime(14);
|
||||
rechnung.Discount = 0;
|
||||
rechnung.Address = string.Format("{0}\n{1} {2}\n{3} {4}", kunde.Name, kunde.Strasse, kunde.Hausnummer, kunde.Plz, kunde.Ort); //"Damian Wessels\nDät Haartje 27A\n26683 Saterland";
|
||||
rechnung.AddressCountry = new ModelStaticCountry()
|
||||
@@ -110,14 +111,26 @@ namespace CardmarketBot
|
||||
Id = null,
|
||||
MapAll = true,
|
||||
Quantity = 1,
|
||||
Price = PortoPreis[kunde.Versandskosten],
|
||||
//Price = PortoPreis[kunde.Versandskosten],
|
||||
Name = "Versandskosten",
|
||||
PositionNumber = 0,
|
||||
Discount = 0,
|
||||
TaxRate = 19,
|
||||
PriceGross = PortoPreis[kunde.Versandskosten],
|
||||
//PriceGross = PortoPreis[kunde.Versandskosten],
|
||||
PriceTax = 19
|
||||
};
|
||||
if(kunde.OverrideVersandskosten != null)
|
||||
{
|
||||
//Debugger.Break();
|
||||
temp.InvoicePosSaves[temp.InvoicePosSaves.Length - 1].Price = Convert.ToDecimal(kunde.OverrideVersandskosten);
|
||||
temp.InvoicePosSaves[temp.InvoicePosSaves.Length - 1].Price = Convert.ToDecimal(kunde.OverrideVersandskosten);
|
||||
//Debugger.Break();
|
||||
}
|
||||
else
|
||||
{
|
||||
temp.InvoicePosSaves[temp.InvoicePosSaves.Length - 1].Price = PortoPreis[kunde.Versandskosten];
|
||||
temp.InvoicePosSaves[temp.InvoicePosSaves.Length - 1].PriceGross = PortoPreis[kunde.Versandskosten];
|
||||
}
|
||||
result.Add(temp);
|
||||
|
||||
}
|
||||
|
||||
@@ -48,5 +48,6 @@ class Kunde
|
||||
plz = PLZ;
|
||||
ort = Ort;
|
||||
land = Land;
|
||||
Versandskosten = Helper.Porto.FAILED;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user