Commit 15cf7db5 by Cam Hayes

Fixed pdf generation issue

parent 2702ac1c
......@@ -2,3 +2,4 @@
"AuthUrl" : "https://webapps.em-sys.net/kgOrders/auth/",
"ApiUrl" : "https://webapps.em-sys.net/kgOrders/api/"
}
......@@ -156,15 +156,19 @@ var
colorArray: TJSONArray;
colorsObject, colorObject: TJSONObject;
colorsString: string;
i, maxColors: Integer;
i, maxColors, totalColors: Integer;
begin
logger.Log( 5, 'TrptOrderCorrugated.PopulateColorTable' );
maxColors := 13;
colorsString := uqOrderCorrugated.FieldByName('colors_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
colorArray := TJSONArray(colorsObject.GetValue<TJSONArray>('items'));
totalColors := colorArray.Count;
for i := 0 to maxColors - 1 do
if totalColors > maxColors then
totalColors := maxColors;
for i := 0 to totalColors - 1 do
begin
row := frxOrderCorrugated.FindObject('ColorRow' + IntToStr(i + 1)) as TfrxCustomTableRow;
colorObject := colorArray.Items[i] as TJSONObject;
......
......@@ -155,7 +155,7 @@ var
colorArray: TJSONArray;
colorsObject, colorObject: TJSONObject;
colorsString: string;
i, maxColors: Integer;
i, maxColors, totalColors: Integer;
begin
maxColors := 10;
logger.Log( 5, 'TrptOrderWeb.PopulateColorTable' );
......@@ -163,8 +163,12 @@ begin
colorsString := uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
colorArray := TJSONArray(colorsObject.GetValue<TJSONArray>('items'));
totalColors := colorArray.Count;
for i := 0 to maxColors - 1 do
if totalColors > maxColors then
totalColors := maxColors;
for i := 0 to totalColors - 1 do
begin
row := frxOrderWeb.FindObject('ColorRow' + IntToStr(i + 1)) as TfrxCustomTableRow;
colorObject := colorArray.Items[i] as TJSONObject;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment