Repository navigation
Expand file tree
/
Copy pathIMerchandiseReturnViewModelService.cs
More file actions
67 lines (53 loc) · 3.43 KB
/
Copy pathIMerchandiseReturnViewModelService.cs
File metadata and controls
67 lines (53 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using Grand.Domain.Common;
using Grand.Domain.Orders;
using Grand.Web.AdminShared.Models.Common;
using Grand.Web.AdminShared.Models.Orders;
namespace Grand.Web.AdminShared.Interfaces;
public interface IMerchandiseReturnViewModelService
{
Task<MerchandiseReturnModel> PrepareMerchandiseReturnModel(MerchandiseReturnModel model,
MerchandiseReturn merchandiseReturn, bool excludeProperties);
Task<(IList<MerchandiseReturnModel> merchandiseReturnModels, int totalCount)> PrepareMerchandiseReturnModel(
MerchandiseReturnListModel model, int pageIndex, int pageSize);
Task<AddressModel> PrepareAddressModel(AddressModel model, Address address, bool excludeProperties);
Task<MerchandiseReturnListModel> PrepareReturnRequestListModel();
Task<IList<MerchandiseReturnModel.MerchandiseReturnItemModel>> PrepareMerchandiseReturnItemModel(
string merchandiseReturnId);
/// <summary>
/// The return receipts of the return and whether "Receive to stock" is offered, with what is left to receive
/// and the warehouses to receive it to, the drop-off point's first; only for a panel with inventory documents,
/// as it reads the panel's warehouses
/// </summary>
Task PrepareReturnReceipts(MerchandiseReturnModel model, MerchandiseReturn merchandiseReturn);
/// <summary>
/// The refund of the return: the refund made or under way, in any panel; or, for a panel that refunds
/// (canRefund) and a staff member who refunds payments, what the refund of a received return comes to, with
/// the amount to refund filled in
/// </summary>
Task PrepareRefund(MerchandiseReturnModel model, MerchandiseReturn merchandiseReturn, bool canRefund);
/// <summary>
/// Gives back the amount for the return through the payment of its order, online or offline; the reason it
/// was not, as a resource key without the panel's prefix, or null
/// </summary>
Task<string> RefundMerchandiseReturn(MerchandiseReturn merchandiseReturn, double amount, bool offline);
/// <summary>
/// Records whether the money of a refund that waits for its check went back, as the staff who checked the
/// payment say; the reason it was not recorded, as a resource key without the panel's prefix, or null
/// </summary>
Task<string> ResolveRefund(MerchandiseReturn merchandiseReturn, bool wentBack);
/// <summary>
/// Saves the edit form, then changes the status when a status button posted it (ChangeStatusTo). Error is
/// why the form or the status was not saved, as a resource key without the panel's prefix
/// </summary>
Task<(MerchandiseReturn MerchandiseReturn, string Error)> UpdateMerchandiseReturnModel(MerchandiseReturn merchandiseReturn,
MerchandiseReturnModel model, List<CustomAttribute> customAddressAttributes);
/// <summary>
/// Deletes the return; the reason it was not, as a resource key without the panel's prefix, or null
/// </summary>
Task<string> DeleteMerchandiseReturn(MerchandiseReturn merchandiseReturn);
Task<IList<MerchandiseReturnModel.MerchandiseReturnNote>> PrepareMerchandiseReturnNotes(
MerchandiseReturn merchandiseReturn);
Task<bool> InsertMerchandiseReturnNote(MerchandiseReturn merchandiseReturn, Order order, string downloadId,
bool displayToCustomer, string message);
Task DeleteMerchandiseReturnNote(MerchandiseReturn merchandiseReturn, string id);
}