Added VatReport.Guid field
This commit is contained in:
@@ -59,6 +59,8 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Types\Financial\BasicHotBitcoinAddress.cs" />
|
||||
<Compile Include="Types\Financial\BasicHotBitcoinAddressUnspent.cs" />
|
||||
<Compile Include="Types\Financial\BasicVatReport.cs" />
|
||||
<Compile Include="Types\Financial\BasicVatReportItem.cs" />
|
||||
<Compile Include="Types\Governance\BasicBallot.cs" />
|
||||
<Compile Include="Types\Swarm\BasicPosition.cs" />
|
||||
<Compile Include="Types\Swarm\BasicPositionAssignment.cs" />
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Swarmops.Database
|
||||
/// </summary>
|
||||
public static int DbVersionExpected
|
||||
{
|
||||
get { return 38; }
|
||||
get { return 39; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
<Compile Include="Database-Reporters.cs" />
|
||||
<Compile Include="Database-Roles.cs" />
|
||||
<Compile Include="Database-OutboundPhoneMessages.cs" />
|
||||
<Compile Include="Database-VatReports.cs" />
|
||||
<Compile Include="Database-Salaries.cs" />
|
||||
<Compile Include="Database-SwarmopsLog.cs" />
|
||||
<Compile Include="Database-TaxLevels.cs" />
|
||||
|
||||
@@ -35,4 +35,5 @@
|
||||
0035 - Added OrganizationSequenceId on FinancialTransactions, VatCents setter on invoices [RF]
|
||||
0036 - Added support for VatCents on ExpenseClaims [RF]
|
||||
0037 - Added Suppliers, ExternalContacts tables; no procs for them yet [RF]
|
||||
0038 - VAT Report tables and functions [RF]
|
||||
0038 - VAT Report tables and functions [RF]
|
||||
0039 - VatReport.Guid added [RF]
|
||||
@@ -0,0 +1,32 @@
|
||||
ALTER TABLE `VatReports`
|
||||
ADD COLUMN `Guid` VARCHAR(128) NOT NULL AFTER `OrganizationId`,
|
||||
ADD INDEX `Ix_Guid` (`Guid` ASC)
|
||||
|
||||
#
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS `CreateVatReport`
|
||||
|
||||
|
||||
#
|
||||
|
||||
|
||||
CREATE DEFINER=`swarmops-live-a`@`%` PROCEDURE `CreateVatReport`(
|
||||
organizationId INT,
|
||||
guid VARCHAR(128),
|
||||
createdDateTime DATETIME,
|
||||
yearMonthStart BIGINT,
|
||||
monthCount INT
|
||||
)
|
||||
BEGIN
|
||||
INSERT INTO VatReports
|
||||
(OrganizationId,Guid,CreatedDateTime,YearMonthStart,MonthCount,Open,TurnoverCents,VatInboundCents,VatOutboundCents,UnderConstruction)
|
||||
VALUES
|
||||
(organizationId,guid,createdDateTime,yearMonthStart,monthCount,1,0,0,0,1);
|
||||
|
||||
SELECT LAST_INSERT_ID() AS Identity;
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user