Explorar o código

Fixed GL Codes and Payment Terms on Customer Invoices
Made Bill Links available on Purchase Order Lines
Fixedbroken V6 Quote query
Fixed broken ManufacturingStatus screen

frogsoftware hai 10 meses
pai
achega
d166bb36d5

+ 1 - 0
prs.classes/Entities/Customer/CustomerLink.cs

@@ -15,6 +15,7 @@ namespace Comal.Classes
         public string Name { get; set; }
         
         [NullEditor]
+        [RequiredColumn]
         public PaymentTermsLink Terms { get; set; }
         
         [NullEditor]

+ 3 - 0
prs.classes/Entities/Job/Job.cs

@@ -39,6 +39,7 @@ namespace Comal.Classes
         public JobType JobType { get; set; } = JobType.Project;
 
         [EditorSequence(4)]
+        [RequiredColumn]
         public CustomerLink Customer { get; set; }
         
         [EditorSequence(5)]
@@ -61,6 +62,7 @@ namespace Comal.Classes
         
         [EditorSequence("Accounts",1)]
         [Caption("Bill To")]
+        [RequiredColumn]
         public AccountLink Account { get; set; }
 
         [EditorSequence("Accounts",2)]
@@ -227,6 +229,7 @@ namespace Comal.Classes
             LinkedProperties.Register<Job,Address,double>(x=>x.Customer.Delivery, x=>x.Location.Latitude, x=>x.SiteAddress.Location.Latitude);
             LinkedProperties.Register<Job,Address,double>(x=>x.Customer.Delivery, x=>x.Location.Longitude, x=>x.SiteAddress.Location.Longitude);
             LinkedProperties.Register<Job,Address,DateTime>(x=>x.Customer.Delivery, x=>x.Location.Timestamp, x=>x.SiteAddress.Location.Timestamp);
+            LinkedProperties.Register<Job, AccountLink, Guid>(x => x.Customer.Account, x => x.ID, x => x.Account.ID);
         }
     }
 }

+ 1 - 0
prs.classes/Entities/PaymentTerms/PaymentTermsLink.cs

@@ -6,6 +6,7 @@ namespace Comal.Classes
     public class PaymentTermsLink : EntityLink<PaymentTerms>
     {
         [LookupEditor(typeof(PaymentTerms))]
+        [RequiredColumn]
         public override Guid ID { get; set; }
         
         [EditorSequence(1)]

+ 4 - 5
prs.classes/Entities/PurchaseOrder/PurchaseOrderItem.cs

@@ -135,6 +135,9 @@ namespace Comal.Classes
         
         [CurrencyEditor(Visible = Visible.Optional, Editable = Editable.Hidden, Summary = Summary.Sum)]
         public double Balance { get; set; }
+        
+        [EntityRelationship(DeleteAction.SetNull)]
+        public BillLineLink BillLine { get; set; }
 
         [NullEditor]
         public string PostedReference { get; set; }
@@ -165,13 +168,9 @@ namespace Comal.Classes
         [NullEditor]
         [Obsolete]
         public StockMovementLink StockMovement { get; set; }
+        
 
 
-
-        [NullEditor]
-        [EntityRelationship(DeleteAction.SetNull)]
-        public BillLineLink BillLine { get; set; }
-
         [NullEditor]
         [EntityRelationship(DeleteAction.SetNull)]
         public ManufacturingPacketLink Packet { get; set; }

+ 2 - 2
prs.classes/Entities/V6/V6Quote.cs

@@ -77,7 +77,7 @@ namespace Comal.Classes
             + $"  q.quote_num_suff as {nameof(Variation)}, \n" 
             + $"  c.cust_code as {nameof(ClientID)}, \n" 
             + $"  c.cust_name as {nameof(ClientName)}, \n" 
-            + $"  concat_ws(a.addr_1,chr(13),a.addr_2) as {nameof(Street)}, \n"
+            + $"  coalesce(a.addr_1,'') + coalesce(char(13)+char(10)+a.addr_2,'') as {nameof(Street)}, \n"
             + $"  a.addr_3 as {nameof(City)}, \n"
             + $"  a.addr_4 as {nameof(State)}, \n"
             + $"  a.addr_5 as {nameof(PostCode)}, \n"
@@ -85,7 +85,7 @@ namespace Comal.Classes
             + $"  q.nett_sell_price + q.nett_sell_prc_lab as {nameof(SellPrice)} \n" 
             + "from quote q \n" 
             + "  left outer join customer c on q.cust_id = c.cust_id \n" 
-            + "  left outer join addr a on quote.cust_addr_id = a.addr_id \n"
+            + "  left outer join addr a on q.del_addr_id = a.addr_id \n"
             + "where  \n"
             + "  q.quote_vers = (select max(quote_vers) from quote where quote_id = q.quote_id) \n"
             + "order by \n"

+ 5 - 1
prs.desktop/Panels/Invoices/InvoiceGrid.cs

@@ -102,7 +102,11 @@ namespace PRSDesktop
                     invoice.Type = InvoiceType.ProgressClaim;
                     invoice.Description = $"Progress claim for {DateTime.Today:MMM yyyy}";
                     invoice.JobLink.CopyFrom(Master);
-                    invoice.CustomerLink.CopyFrom(Master.Account);
+                    if (Master.Account.ID != Guid.Empty) 
+                        invoice.CustomerLink.CopyFrom(Master.Account);
+                    else 
+                        invoice.CustomerLink.CopyFrom(Master.Customer);
+                    
                     invoice.Retained = window.Retained;
 
                     var lines = new List<InvoiceLine>();

+ 1 - 1
prs.desktop/Panels/Manufacturing/ManufacturingPanel.xaml.cs

@@ -729,7 +729,7 @@ namespace PRSDesktop
             columns.Add(x => x.OnHold);
             columns.Add(x => x.Problem.Notes);
             columns.Add(x => x.Problem.Resolved);
-            columns.Add(x => x.Problem.AssignedTo);
+            columns.Add(x => x.Problem.AssignedTo.ID);
             columns.Add(x => x.Priority);
             columns.Add(x => x.Distributed);
             columns.Add(x => x.BarcodeQty);

+ 1 - 1
prs.desktop/Utils/MicrosoftSQL/MicrosoftSQLClient.cs

@@ -21,7 +21,7 @@ public abstract class MicrosoftSQLClient : IDisposable
         {
             connection.Open();
         }
-        catch
+        catch (Exception e)
         {
             connection = null;
         }

+ 1 - 1
prs.desktop/Utils/MicrosoftSQL/V6Utils/V6ProjectImport.xaml

@@ -9,7 +9,7 @@
         xmlns:wpf="clr-namespace:InABox.WPF;assembly=InABox.Wpf"
         xmlns:dynamicGrid="clr-namespace:InABox.DynamicGrid;assembly=InABox.Wpf"
         mc:Ignorable="d"
-        Title="Import from V6" Height="800" Width="800" WindowStartupLocation="CenterScreen">
+        Title="Import from V6" Height="600" Width="1200" WindowStartupLocation="CenterScreen">
     
     <Window.Resources>
         <wpf:EnumToStringConverter x:Key="EnumToStringConverter" />

+ 1 - 1
prs.desktop/prsdesktop.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Desktop"
-#define MyAppVersion "8.22"
+#define MyAppVersion "8.22a"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSDesktop.exe"

+ 1 - 1
prs.licensing/PRSLicensing.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Licensing"
-#define MyAppVersion "8.22"
+#define MyAppVersion "8.22a"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSLicensing.exe"

+ 1 - 1
prs.server/PRSServer.iss

@@ -8,7 +8,7 @@
 #define public Dependency_Path_NetCoreCheck "dependencies\"
 
 #define MyAppName "PRS Server"
-#define MyAppVersion "8.22"
+#define MyAppVersion "8.22a"
 #define MyAppPublisher "PRS Digital"
 #define MyAppURL "https://www.prs-software.com.au"
 #define MyAppExeName "PRSServer.exe"