send the billing code along with the query
This commit is contained in:
parent
ebf860f848
commit
2890e10339
18 changed files with 47 additions and 27 deletions
10
Yavsc.Abstract/Billing/BillingCodes.cs
Normal file
10
Yavsc.Abstract/Billing/BillingCodes.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace Yavsc.Models.Billing
|
||||||
|
{
|
||||||
|
public static class BillingCodes
|
||||||
|
{
|
||||||
|
public const string Rdv = "Rdv";
|
||||||
|
public const string MBrush = "MBrush";
|
||||||
|
|
||||||
|
public const string Brush = "Brush";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||||
namespace Yavsc.Billing
|
namespace Yavsc.Billing
|
||||||
{
|
{
|
||||||
public interface IBillable {
|
public interface IBillable {
|
||||||
|
string BillingCode { get; set; }
|
||||||
string GetDescription ();
|
string GetDescription ();
|
||||||
List<IBillItem> GetBillItems();
|
List<IBillItem> GetBillItems();
|
||||||
long Id { get; set; }
|
long Id { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,13 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
namespace Yavsc.Models.Messaging
|
namespace Yavsc.Models.Messaging
|
||||||
{
|
{
|
||||||
using Models.Relationship;
|
|
||||||
public class ClientProviderInfo
|
public class ClientProviderInfo
|
||||||
{
|
{
|
||||||
public string UserName { get; set; }
|
public string UserName { get; set; }
|
||||||
public string Avatar { get; set; }
|
public string Avatar { get; set; }
|
||||||
[Key]
|
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string EMail { get; set; }
|
public string EMail { get; set; }
|
||||||
public string Phone { get; set; }
|
public string Phone { get; set; }
|
||||||
public Location BillingAddress { get; set; }
|
public ILocation BillingAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
CONFIG=Release
|
CONFIG=Release
|
||||||
VERSION=1.0.5-rc5
|
VERSION=1.0.5-rc6
|
||||||
PRJNAME=Yavsc.Abstract
|
PRJNAME=Yavsc.Abstract
|
||||||
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
PKGFILENAME=$(PRJNAME).$(VERSION).nupkg
|
||||||
DESTPATH=.
|
DESTPATH=.
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,11 @@ using System;
|
||||||
namespace Yavsc.Models
|
namespace Yavsc.Models
|
||||||
{
|
{
|
||||||
using Models.Messaging;
|
using Models.Messaging;
|
||||||
using Models.Relationship;
|
|
||||||
|
|
||||||
public class RdvQueryProviderInfo
|
public class RdvQueryProviderInfo
|
||||||
{
|
{
|
||||||
public ClientProviderInfo Client { get; set; }
|
public ClientProviderInfo Client { get; set; }
|
||||||
public Location Location { get; set; }
|
public ILocation Location { get; set; }
|
||||||
|
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
|
@ -18,6 +17,7 @@ namespace Yavsc.Models
|
||||||
public string Reason { get; set; }
|
public string Reason { get; set; }
|
||||||
|
|
||||||
public string ActivityCode { get; set; }
|
public string ActivityCode { get; set; }
|
||||||
|
public string BillingCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
BIN
Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc6.nupkg
Normal file
BIN
Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc6.nupkg
Normal file
Binary file not shown.
|
|
@ -53,7 +53,8 @@ namespace Yavsc.Controllers
|
||||||
Id = c.Id,
|
Id = c.Id,
|
||||||
Previsional = c.Previsional,
|
Previsional = c.Previsional,
|
||||||
Reason = c.Reason,
|
Reason = c.Reason,
|
||||||
ActivityCode = c.ActivityCode
|
ActivityCode = c.ActivityCode,
|
||||||
|
BillingCode = c.BillingCode
|
||||||
}).
|
}).
|
||||||
OrderBy(c=>c.Id).
|
OrderBy(c=>c.Id).
|
||||||
Take(25);
|
Take(25);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Yavsc.ApiControllers
|
||||||
dbContext = context;
|
dbContext = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet,Route("Profiles/{actCode}")]
|
[HttpGet,Route("profiles/{actCode}")]
|
||||||
IEnumerable<PerformerProfile> Profiles (string actCode)
|
IEnumerable<PerformerProfile> Profiles (string actCode)
|
||||||
{
|
{
|
||||||
return dbContext.ListPerformers(actCode);
|
return dbContext.ListPerformers(actCode);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ namespace Yavsc.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public IActionResult Create(string id, string activityCode)
|
public IActionResult Create(string id, string activityCode, string billingCode)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(id))
|
if (string.IsNullOrWhiteSpace(id))
|
||||||
throw new InvalidOperationException(
|
throw new InvalidOperationException(
|
||||||
|
|
@ -117,7 +117,8 @@ namespace Yavsc.Controllers
|
||||||
PerformerId = pro.PerformerId,
|
PerformerId = pro.PerformerId,
|
||||||
ClientId = userid,
|
ClientId = userid,
|
||||||
Client = user,
|
Client = user,
|
||||||
ActivityCode = activityCode
|
ActivityCode = activityCode,
|
||||||
|
BillingCode = billingCode
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,7 +127,7 @@ namespace Yavsc.Controllers
|
||||||
[ValidateAntiForgeryToken]
|
[ValidateAntiForgeryToken]
|
||||||
public async Task<IActionResult> Create(RdvQuery command)
|
public async Task<IActionResult> Create(RdvQuery command)
|
||||||
{
|
{
|
||||||
|
// TODO validate BillingCode value
|
||||||
var uid = User.GetUserId();
|
var uid = User.GetUserId();
|
||||||
var prid = command.PerformerId;
|
var prid = command.PerformerId;
|
||||||
if (string.IsNullOrWhiteSpace(uid)
|
if (string.IsNullOrWhiteSpace(uid)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ namespace Yavsc.Helpers
|
||||||
EventDate = query.EventDate,
|
EventDate = query.EventDate,
|
||||||
Location = query.Location,
|
Location = query.Location,
|
||||||
Id = query.Id,
|
Id = query.Id,
|
||||||
ActivityCode = query.ActivityCode
|
ActivityCode = query.ActivityCode,
|
||||||
|
BillingCode = query.BillingCode
|
||||||
};
|
};
|
||||||
|
|
||||||
return yaev;
|
return yaev;
|
||||||
|
|
@ -65,7 +66,8 @@ namespace Yavsc.Helpers
|
||||||
Location = query.Location,
|
Location = query.Location,
|
||||||
Id = query.Id,
|
Id = query.Id,
|
||||||
Reason = "Commande groupée!",
|
Reason = "Commande groupée!",
|
||||||
ActivityCode = query.ActivityCode
|
ActivityCode = query.ActivityCode,
|
||||||
|
BillingCode = query.BillingCode
|
||||||
};
|
};
|
||||||
return yaev;
|
return yaev;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,14 @@ CONFIGURATION=Release
|
||||||
ASPNET_LOG_LEVEL=info #warn
|
ASPNET_LOG_LEVEL=info #warn
|
||||||
HOSTING=localhost
|
HOSTING=localhost
|
||||||
HOSTADMIN=root
|
HOSTADMIN=root
|
||||||
|
FRMWRK=dnx451
|
||||||
|
BINTARGET=Yavsc.dll
|
||||||
|
BINTARGETPATH=bin/$(CONFIGURATION)/$(FRMWRK)/$(BINTARGET)
|
||||||
|
|
||||||
|
all: $(BINTARGETPATH)
|
||||||
|
|
||||||
all: bin/$(CONFIGURATION)
|
$(BINTARGETPATH):
|
||||||
|
dnu build
|
||||||
|
|
||||||
deploy: clean pushInPre pushInProd
|
deploy: clean pushInPre pushInProd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,5 +97,10 @@ namespace Yavsc.Models.Billing
|
||||||
[ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")]
|
[ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")]
|
||||||
public virtual PayPalPayment Regularisation { get; set; }
|
public virtual PayPalPayment Regularisation { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string BillingCode
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,6 @@ namespace Yavsc.Services
|
||||||
throw new NotImplementedException("No GCM reg ids");
|
throw new NotImplementedException("No GCM reg ids");
|
||||||
var msg = new MessageWithPayload<Event>()
|
var msg = new MessageWithPayload<Event>()
|
||||||
{
|
{
|
||||||
notification = new Notification()
|
|
||||||
{
|
|
||||||
title = ev.Topic+" "+ev.Sender,
|
|
||||||
body = ev.CreateBody(),
|
|
||||||
icon = "icon"
|
|
||||||
},
|
|
||||||
data = ev,
|
data = ev,
|
||||||
registration_ids = regids.ToArray()
|
registration_ids = regids.ToArray()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ namespace Yavsc
|
||||||
using Microsoft.Data.Entity;
|
using Microsoft.Data.Entity;
|
||||||
using Models;
|
using Models;
|
||||||
using Yavsc.Billing;
|
using Yavsc.Billing;
|
||||||
|
using Yavsc.Models.Billing;
|
||||||
using Yavsc.Models.Haircut;
|
using Yavsc.Models.Haircut;
|
||||||
using Yavsc.Models.Workflow;
|
using Yavsc.Models.Workflow;
|
||||||
|
|
||||||
|
|
@ -76,7 +77,7 @@ mais n'implemente pas l'interface IQueryable<ISpecializationSettings>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterBilling<HairCutQuery>("Brush", new Func<ApplicationDbContext,long,IBillable>
|
RegisterBilling<HairCutQuery>(BillingCodes.Brush, new Func<ApplicationDbContext,long,IBillable>
|
||||||
( ( db, id) =>
|
( ( db, id) =>
|
||||||
{
|
{
|
||||||
var query = db.HairCutQueries.Include(q=>q.Prestation).Include(q=>q.Regularisation).Single(q=>q.Id == id) ;
|
var query = db.HairCutQueries.Include(q=>q.Prestation).Include(q=>q.Regularisation).Single(q=>q.Id == id) ;
|
||||||
|
|
@ -84,9 +85,9 @@ mais n'implemente pas l'interface IQueryable<ISpecializationSettings>
|
||||||
return query;
|
return query;
|
||||||
})) ;
|
})) ;
|
||||||
|
|
||||||
RegisterBilling<HairMultiCutQuery>("MBrush",new Func<ApplicationDbContext,long,IBillable>
|
RegisterBilling<HairMultiCutQuery>(BillingCodes.MBrush,new Func<ApplicationDbContext,long,IBillable>
|
||||||
( (db, id) => db.HairMultiCutQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id)));
|
( (db, id) => db.HairMultiCutQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id)));
|
||||||
RegisterBilling<RdvQuery>("Rdv", new Func<ApplicationDbContext,long,IBillable>
|
RegisterBilling<RdvQuery>(BillingCodes.Rdv, new Func<ApplicationDbContext,long,IBillable>
|
||||||
( (db, id) => db.RdvQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id)));
|
( (db, id) => db.RdvQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id)));
|
||||||
}
|
}
|
||||||
public static System.Reflection.Assembly OnYavscResourceResolve(object sender, ResolveEventArgs ev)
|
public static System.Reflection.Assembly OnYavscResourceResolve(object sender, ResolveEventArgs ev)
|
||||||
|
|
|
||||||
|
|
@ -180,6 +180,7 @@
|
||||||
<span asp-validation-for="Reason" class="text-danger"></span>
|
<span asp-validation-for="Reason" class="text-danger"></span>
|
||||||
@Html.HiddenFor(model=>model.Location.Latitude)
|
@Html.HiddenFor(model=>model.Location.Latitude)
|
||||||
@Html.HiddenFor(model=>model.Location.Longitude)
|
@Html.HiddenFor(model=>model.Location.Longitude)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -195,6 +196,7 @@
|
||||||
@Html.HiddenFor(model=>model.ClientId)
|
@Html.HiddenFor(model=>model.ClientId)
|
||||||
@Html.HiddenFor(model=>model.PerformerId)
|
@Html.HiddenFor(model=>model.PerformerId)
|
||||||
@Html.HiddenFor(model=>model.ActivityCode)
|
@Html.HiddenFor(model=>model.ActivityCode)
|
||||||
|
@Html.HiddenFor(model=>model.BillingCode)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
@Html.DisplayFor(m=>profile)
|
@Html.DisplayFor(m=>profile)
|
||||||
<form action="~/Command/Create" >
|
<form action="~/Command/Create" >
|
||||||
<input type="hidden" name="id" value="@profile.PerformerId" />
|
<input type="hidden" name="id" value="@profile.PerformerId" />
|
||||||
|
<input type="hidden" name="billingCode" value="Profiles" />
|
||||||
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
|
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
|
||||||
<input type="submit" class="btn btn-success" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
|
<input type="submit" class="btn btn-success" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,7 @@
|
||||||
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
|
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
|
||||||
"System.Json": "4.0.20126.16343",
|
"System.Json": "4.0.20126.16343",
|
||||||
"Yavsc.Abstract": {
|
"Yavsc.Abstract": {
|
||||||
"type": "build",
|
"type": "build"
|
||||||
"version": "1.0.5"
|
|
||||||
},
|
},
|
||||||
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713",
|
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713",
|
||||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
|
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
|
||||||
|
|
@ -166,4 +165,4 @@
|
||||||
"postpublish": "echo after publish"
|
"postpublish": "echo after publish"
|
||||||
},
|
},
|
||||||
"embed": "Views/**/*.cshtml"
|
"embed": "Views/**/*.cshtml"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11437,7 +11437,7 @@
|
||||||
"Microsoft.AspNet.Mvc.Formatters.Json >= 6.0.0-rc1-final",
|
"Microsoft.AspNet.Mvc.Formatters.Json >= 6.0.0-rc1-final",
|
||||||
"Microsoft.AspNet.OWin >= 1.0.0-rc1-final",
|
"Microsoft.AspNet.OWin >= 1.0.0-rc1-final",
|
||||||
"System.Json >= 4.0.20126.16343",
|
"System.Json >= 4.0.20126.16343",
|
||||||
"Yavsc.Abstract >= 1.0.5",
|
"Yavsc.Abstract ",
|
||||||
"Extensions.AspNet.Authentication.Instagram >= 1.0.0-t150809211713",
|
"Extensions.AspNet.Authentication.Instagram >= 1.0.0-t150809211713",
|
||||||
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final",
|
"Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final",
|
||||||
"Microsoft.DiaSymReader.Native >= 1.5.0",
|
"Microsoft.DiaSymReader.Native >= 1.5.0",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue