Compare commits

..

No commits in common. "995fa050efbcbcfd4769a23b30cc2b6f8363cfd8" and "2a4ccf5490cd6f17b1eac8b27a45ff968e67c989" have entirely different histories.

2 changed files with 2 additions and 15 deletions

View File

@ -105,8 +105,6 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
var shippingCountry = await _countryService.GetCountryByAddressAsync(shippingAddress); var shippingCountry = await _countryService.GetCountryByAddressAsync(shippingAddress);
var shippingCountryCode = shippingCountry?.TwoLetterIsoCode ?? billingCountryCode; var shippingCountryCode = shippingCountry?.TwoLetterIsoCode ?? billingCountryCode;
string megjegyzes = string.Empty;
// Create order request // Create order request
var orderRequest = new OrderCreateRequest var orderRequest = new OrderCreateRequest
{ {
@ -125,8 +123,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
//Email = customer.Email ?? string.Empty, //Email = customer.Email ?? string.Empty,
Email = billingAddress.Email ?? customer.Email ?? string.Empty, Email = billingAddress.Email ?? customer.Email ?? string.Empty,
Telefon = billingAddress.PhoneNumber ?? string.Empty, Telefon = billingAddress.PhoneNumber ?? string.Empty,
MegrendelesSzamStr = orderDto.Id.ToString(), MegrendelesSzamStr = orderDto.Id.ToString()
Megjegyzes = $""
}; };
// Add shipping address details // Add shipping address details
@ -177,15 +174,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
CikkSzam = string.Empty CikkSzam = string.Empty
}); });
} }
if(item.UnitPriceInclTax != product.Price)
{
megjegyzes += $"{productName} egységár módosítva: {Math.Round(product.Price, 2)} Ft -> {Math.Round(item.UnitPriceInclTax, 2)} Ft; \n";
megjegyzes += $"Kedvezmény: { ((1 - (item.UnitPriceInclTax / product.Price)) * 100).ToString() }%; \n";
} }
}
orderRequest.Megjegyzes = megjegyzes;
// Create order via API // Create order via API
var response = await _innVoiceOrderService.CreateOrderAsync(orderRequest); var response = await _innVoiceOrderService.CreateOrderAsync(orderRequest);
@ -381,8 +370,7 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Areas.Admin.Controllers
FizetesiMod = order.PaymentMethodSystemName, FizetesiMod = order.PaymentMethodSystemName,
Email = billingAddress.Email, Email = billingAddress.Email,
Telefon = billingAddress.PhoneNumber, Telefon = billingAddress.PhoneNumber,
MegrendelesSzamStr = order.Id.ToString(), MegrendelesSzamStr = order.Id.ToString()
Megjegyzes = $""
}; };
// Add order items // Add order items

View File

@ -18,7 +18,6 @@ namespace Nop.Plugin.Misc.FruitBankPlugin.Services
private readonly string _password; private readonly string _password;
private readonly string _baseUrl; private readonly string _baseUrl;
//public InnVoiceOrderService(string companyName = "apiteszt", string username = "apiteszt", string password = "dsjfluio4324hjhjfdhkjskjh213kjgsd", string baseUrl = "https://api.innvoice.hu")
public InnVoiceOrderService(string companyName = "fruitbank", string username = "fruitbank", string password = "YkKzM1dwJax0HTlPWlMABSqdSA", string baseUrl = "https://api.innvoice.hu") public InnVoiceOrderService(string companyName = "fruitbank", string username = "fruitbank", string password = "YkKzM1dwJax0HTlPWlMABSqdSA", string baseUrl = "https://api.innvoice.hu")
{ {
_companyName = companyName ?? throw new ArgumentNullException(nameof(companyName)); _companyName = companyName ?? throw new ArgumentNullException(nameof(companyName));