1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-26 17:37:36 +01:00

org tax information

This commit is contained in:
Kyle Spearrin 2017-10-25 12:41:07 -04:00
parent 8ba3e27a7d
commit e41461f8fc
10 changed files with 61 additions and 13 deletions

View File

@ -14,12 +14,11 @@ namespace Bit.Api.Models
OurAddress3 = apiSettings.OurAddress3;
CustomerName = organization.BusinessName ?? "--";
// TODO: address and vat
CustomerAddress1 = "123 Any St";
CustomerAddress2 = "New York, NY 10001";
CustomerAddress3 = "United States";
CustomerAddress4 = null;
CustomerVatNumber = "PT123456789";
CustomerAddress1 = organization.BusinessAddress1;
CustomerAddress2 = organization.BusinessAddress2;
CustomerAddress3 = organization.BusinessAddress3;
CustomerCountry = organization.BusinessCountry;
CustomerVatNumber = organization.BusinessTaxNumber;
InvoiceDate = invoice.Date?.ToLongDateString();
InvoiceDueDate = invoice.DueDate?.ToLongDateString();
@ -43,7 +42,7 @@ namespace Bit.Api.Models
public string CustomerAddress1 { get; set; }
public string CustomerAddress2 { get; set; }
public string CustomerAddress3 { get; set; }
public string CustomerAddress4 { get; set; }
public string CustomerCountry { get; set; }
public IEnumerable<Item> Items { get; set; }
public string SubtotalAmount { get; set; }
public string VatTotalAmount { get; set; }

View File

@ -3,12 +3,12 @@
<head>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
}
h1, h2, h3, h4 {
font-family: Arial, Helvetica, sans-serif;
h1, h2, h3, h4, h5 {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
table {
@ -45,7 +45,7 @@
.number {
float: right;
text-align: right;
font-family: Courier New, Courier, monospace;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
</style>
</head>
@ -90,9 +90,9 @@
{
@Model.CustomerAddress3<br />
}
@if(!string.IsNullOrWhiteSpace(Model.CustomerAddress4))
@if(!string.IsNullOrWhiteSpace(Model.CustomerCountry))
{
@Model.CustomerAddress4
@Model.CustomerCountry
}
</p>
@if(Model.UsesVat)

View File

@ -29,6 +29,7 @@ namespace Bit.Core.Models.Api
[EncryptedString]
[StringLength(1000)]
public string CollectionName { get; set; }
public string Country { get; set; }
public virtual OrganizationSignup ToOrganizationSignup(User user)
{
@ -43,6 +44,7 @@ namespace Bit.Core.Models.Api
AdditionalStorageGb = AdditionalStorageGb.GetValueOrDefault(0),
BillingEmail = BillingEmail,
BusinessName = BusinessName,
BusinessCountry = Country,
CollectionName = CollectionName
};
}

View File

@ -19,6 +19,11 @@ namespace Bit.Core.Models.Api
Id = organization.Id.ToString();
Name = organization.Name;
BusinessName = organization.BusinessName;
BusinessAddress1 = organization.BusinessAddress1;
BusinessAddress2 = organization.BusinessAddress2;
BusinessAddress3 = organization.BusinessAddress3;
BusinessCountry = organization.BusinessCountry;
BusinessTaxNumber = organization.BusinessTaxNumber;
BillingEmail = organization.BillingEmail;
Plan = organization.Plan;
PlanType = organization.PlanType;
@ -32,6 +37,11 @@ namespace Bit.Core.Models.Api
public string Id { get; set; }
public string Name { get; set; }
public string BusinessName { get; set; }
public string BusinessAddress1 { get; set; }
public string BusinessAddress2 { get; set; }
public string BusinessAddress3 { get; set; }
public string BusinessCountry { get; set; }
public string BusinessTaxNumber { get; set; }
public string BillingEmail { get; set; }
public string Plan { get; set; }
public Enums.PlanType PlanType { get; set; }

View File

@ -6,6 +6,7 @@ namespace Bit.Core.Models.Business
{
public string Name { get; set; }
public string BusinessName { get; set; }
public string BusinessCountry { get; set; }
public string BillingEmail { get; set; }
public User Owner { get; set; }
public string OwnerKey { get; set; }

View File

@ -11,6 +11,11 @@ namespace Bit.Core.Models.Table
public Guid Id { get; set; }
public string Name { get; set; }
public string BusinessName { get; set; }
public string BusinessAddress1 { get; set; }
public string BusinessAddress2 { get; set; }
public string BusinessAddress3 { get; set; }
public string BusinessCountry { get; set; }
public string BusinessTaxNumber { get; set; }
public string BillingEmail { get; set; }
public string Plan { get; set; }
public PlanType PlanType { get; set; }

View File

@ -517,6 +517,7 @@ namespace Bit.Core.Services
Name = signup.Name,
BillingEmail = signup.BillingEmail,
BusinessName = signup.BusinessName,
BusinessCountry = signup.BusinessCountry,
PlanType = plan.Type,
Seats = (short)(plan.BaseSeats + signup.AdditionalSeats),
MaxCollections = plan.MaxCollections,

View File

@ -2,6 +2,11 @@
@Id UNIQUEIDENTIFIER,
@Name NVARCHAR(50),
@BusinessName NVARCHAR(50),
@BusinessAddress1 NVARCHAR(50),
@BusinessAddress2 NVARCHAR(50),
@BusinessAddress3 NVARCHAR(50),
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(50),
@Plan NVARCHAR(50),
@PlanType TINYINT,
@ -30,6 +35,11 @@ BEGIN
[Id],
[Name],
[BusinessName],
[BusinessAddress1],
[BusinessAddress2],
[BusinessAddress3],
[BusinessCountry],
[BusinessTaxNumber],
[BillingEmail],
[Plan],
[PlanType],
@ -55,6 +65,11 @@ BEGIN
@Id,
@Name,
@BusinessName,
@BusinessAddress1,
@BusinessAddress2,
@BusinessAddress3,
@BusinessCountry,
@BusinessTaxNumber,
@BillingEmail,
@Plan,
@PlanType,

View File

@ -2,6 +2,11 @@
@Id UNIQUEIDENTIFIER,
@Name NVARCHAR(50),
@BusinessName NVARCHAR(50),
@BusinessAddress1 NVARCHAR(50),
@BusinessAddress2 NVARCHAR(50),
@BusinessAddress3 NVARCHAR(50),
@BusinessCountry VARCHAR(2),
@BusinessTaxNumber NVARCHAR(30),
@BillingEmail NVARCHAR(50),
@Plan NVARCHAR(50),
@PlanType TINYINT,
@ -31,6 +36,11 @@ BEGIN
SET
[Name] = @Name,
[BusinessName] = @BusinessName,
[BusinessAddress1] = @BusinessAddress1,
[BusinessAddress2] = @BusinessAddress2,
[BusinessAddress3] = @BusinessAddress3,
[BusinessCountry] = @BusinessCountry,
[BusinessTaxNumber] = @BusinessTaxNumber,
[BillingEmail] = @BillingEmail,
[Plan] = @Plan,
[PlanType] = @PlanType,

View File

@ -2,6 +2,11 @@
[Id] UNIQUEIDENTIFIER NOT NULL,
[Name] NVARCHAR (50) NOT NULL,
[BusinessName] NVARCHAR (50) NULL,
[BusinessAddress1] NVARCHAR (50) NULL,
[BusinessAddress2] NVARCHAR (50) NULL,
[BusinessAddress3] NVARCHAR (50) NULL,
[BusinessCountry] VARCHAR (2) NULL,
[BusinessTaxNumber] NVARCHAR (30) NULL,
[BillingEmail] NVARCHAR (50) NOT NULL,
[Plan] NVARCHAR (50) NOT NULL,
[PlanType] TINYINT NOT NULL,