update price list build to include status and stocked
This commit is contained in:
parent
b4291d15e7
commit
022240f8d3
37
FL.bas
37
FL.bas
@ -895,12 +895,12 @@ Sub extract_price_matrix()
|
|||||||
End With
|
End With
|
||||||
|
|
||||||
For i = 1 To UBound(cms_pl, 1)
|
For i = 1 To UBound(cms_pl, 1)
|
||||||
Select Case cms_pl(i, 11)
|
Select Case cms_pl(i, 13)
|
||||||
Case ""
|
Case ""
|
||||||
Case "no unit conversion"
|
Case "no unit conversion"
|
||||||
orig.Worksheet.Cells(orig.row + cms_pl(i, 12) - 1, orig.column + cms_pl(i, 13) - 1).Interior.Color = RGB(255, 255, 161)
|
orig.Worksheet.Cells(orig.row + cms_pl(i, 14) - 1, orig.column + cms_pl(i, 15) - 1).Interior.Color = RGB(255, 255, 161)
|
||||||
Case "no part number"
|
Case "no part number"
|
||||||
orig.Worksheet.Cells(orig.row + cms_pl(i, 12) - 1, orig.column + cms_pl(i, 13) - 1).Interior.Color = RGB(220, 220, 220)
|
orig.Worksheet.Cells(orig.row + cms_pl(i, 14) - 1, orig.column + cms_pl(i, 15) - 1).Interior.Color = RGB(220, 220, 220)
|
||||||
End Select
|
End Select
|
||||||
Next i
|
Next i
|
||||||
|
|
||||||
@ -939,9 +939,9 @@ Sub go_to_price_issue()
|
|||||||
|
|
||||||
i = 1
|
i = 1
|
||||||
Do Until price_sheet.Cells(i, 1) = ""
|
Do Until price_sheet.Cells(i, 1) = ""
|
||||||
If price_sheet.Cells(i, 13) = trow And price_sheet.Cells(i, 14) = tcol And price_sheet.Cells(i, 12) <> "" Then
|
If price_sheet.Cells(i, 15) = trow And price_sheet.Cells(i, 16) = tcol And price_sheet.Cells(i, 14) <> "" Then
|
||||||
price_sheet.Select
|
price_sheet.Select
|
||||||
ActiveSheet.Cells(i, 12).Select
|
ActiveSheet.Cells(i, 14).Select
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
i = i + 1
|
i = i + 1
|
||||||
@ -982,6 +982,14 @@ PRICELIST_SHOW:
|
|||||||
GoTo PRICELIST_SHOW
|
GoTo PRICELIST_SHOW
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not pricelist.cbInactive Then
|
||||||
|
Call x.TBLp_FilterSingle(pl, 11, "I", False)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not pricelist.cbNonStocked Then
|
||||||
|
Call x.TBLp_FilterSingle(pl, 10, "A", True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
ul(0, 0) = "HDR"
|
ul(0, 0) = "HDR"
|
||||||
ul(1, 0) = pl_action
|
ul(1, 0) = pl_action
|
||||||
@ -993,23 +1001,22 @@ PRICELIST_SHOW:
|
|||||||
ul(7, 0) = "N"
|
ul(7, 0) = "N"
|
||||||
j = 0
|
j = 0
|
||||||
For i = LBound(pl, 2) + 1 To UBound(pl, 2)
|
For i = LBound(pl, 2) + 1 To UBound(pl, 2)
|
||||||
'if there is no UOM conversion, don't create a row
|
'if there is no [uom, part#, price], don't create a row
|
||||||
If pl(10, i) <> "" And pl(11, i) <> "" Then
|
If pl(12, i) <> "" And pl(13, i) <> "" And pl(8, i) <> "" And pl(9, i) <> "" Then
|
||||||
j = j + 1
|
j = j + 1
|
||||||
ul(0, j) = "DTL"
|
ul(0, j) = "DTL" 'DTL
|
||||||
ul(1, j) = pl_code
|
ul(1, j) = pl_code 'Price list code
|
||||||
ul(2, j) = pl(9, i)
|
ul(2, j) = pl(9, i) 'part number
|
||||||
ul(3, j) = pl(7, i)
|
ul(3, j) = pl(7, i) 'price unit
|
||||||
ul(4, j) = Format(CDbl(pl(6, i)) * CDbl(pl(10, i)) / CDbl(pl(11, i)), "0.00")
|
ul(4, j) = Format(CDbl(pl(6, i)) * CDbl(pl(12, i)) / CDbl(pl(13, i)), "0.00") 'volume break in price uom
|
||||||
ul(5, j) = Format(pl(6, i), "0.00")
|
ul(5, j) = Format(pl(8, i), "0.00") 'price
|
||||||
ul(11, j) = "1"
|
ul(11, j) = "1" 'add, update, delete
|
||||||
End If
|
End If
|
||||||
Next i
|
Next i
|
||||||
|
|
||||||
ReDim Preserve ul(11, j)
|
ReDim Preserve ul(11, j)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'--------Open file-------------
|
'--------Open file-------------
|
||||||
|
|
||||||
If Not x.FILEp_CreateCSV(pricelist.tbPATH.Text & "\" & pl_code & ".csv", ul) Then
|
If Not x.FILEp_CreateCSV(pricelist.tbPATH.Text & "\" & pl_code & ".csv", ul) Then
|
||||||
|
@ -34,6 +34,8 @@ Public Enum SQLsyntax
|
|||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Function TBLp_Aggregate(ByRef tbl() As String, ByRef needsort As Boolean, ByRef headers As Boolean, ByRef del_unused As Boolean, ParamArray groupnum_type_sumnum()) As Boolean
|
Public Function TBLp_Aggregate(ByRef tbl() As String, ByRef needsort As Boolean, ByRef headers As Boolean, ByRef del_unused As Boolean, ParamArray groupnum_type_sumnum()) As Boolean
|
||||||
|
|
||||||
Dim i As Long
|
Dim i As Long
|
||||||
@ -501,17 +503,16 @@ End Function
|
|||||||
|
|
||||||
Public Sub TBLp_FilterSingle(ByRef table() As String, ByRef column As Long, ByVal Filter As String, ByVal Equals As Boolean)
|
Public Sub TBLp_FilterSingle(ByRef table() As String, ByRef column As Long, ByVal Filter As String, ByVal Equals As Boolean)
|
||||||
|
|
||||||
|
|
||||||
Dim i As Long
|
Dim i As Long
|
||||||
Dim j As Long
|
Dim j As Long
|
||||||
Dim m As Long
|
Dim m As Long
|
||||||
|
|
||||||
j = 0
|
j = LBound(table, 2)
|
||||||
i = 1
|
i = LBound(table, 2) + 1
|
||||||
While i <= UBound(table, 2)
|
While i <= UBound(table, 2)
|
||||||
If (table(column, i) = Filter) = Equals Then
|
If (table(column, i) = Filter) = Equals Then
|
||||||
j = j + 1
|
j = j + 1
|
||||||
m = 0
|
m = LBound(table, 1)
|
||||||
While m <= UBound(table, 1)
|
While m <= UBound(table, 1)
|
||||||
table(m, j) = table(m, i)
|
table(m, j) = table(m, i)
|
||||||
m = m + 1
|
m = m + 1
|
||||||
@ -520,7 +521,7 @@ Public Sub TBLp_FilterSingle(ByRef table() As String, ByRef column As Long, ByVa
|
|||||||
i = i + 1
|
i = i + 1
|
||||||
Wend
|
Wend
|
||||||
|
|
||||||
ReDim Preserve table(UBound(table, 1), j)
|
ReDim Preserve table(LBound(table, 1) To UBound(table, 1), LBound(table, 2) To j)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -1679,10 +1680,10 @@ Function FILEp_CreateCSV(ByRef path As String, ByRef recs() As String) As Boolea
|
|||||||
For j = 0 To UBound(recs, 1)
|
For j = 0 To UBound(recs, 1)
|
||||||
If j = 0 Then
|
If j = 0 Then
|
||||||
test_empty = Replace(Replace(recs(j, i), ",", ""), """", "")
|
test_empty = Replace(Replace(recs(j, i), ",", ""), """", "")
|
||||||
wl = """" & Replace(Replace(recs(j, i), ",", ""), """", "") & """"
|
wl = Replace(Replace(recs(j, i), ",", ""), """", "")
|
||||||
Else
|
Else
|
||||||
test_empty = test_empty & Replace(Replace(recs(j, i), ",", ""), """", "")
|
test_empty = test_empty & Replace(Replace(recs(j, i), ",", ""), """", "")
|
||||||
wl = wl & ",""" & Replace(Replace(recs(j, i), ",", ""), """", "") & """"
|
wl = wl & "," & Replace(Replace(recs(j, i), ",", ""), """", "")
|
||||||
End If
|
End If
|
||||||
Next j
|
Next j
|
||||||
If Len(test_empty) > 0 Then
|
If Len(test_empty) > 0 Then
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
VERSION 5.00
|
VERSION 5.00
|
||||||
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} login
|
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} login
|
||||||
Caption = "CMS Login"
|
Caption = "CMS Login"
|
||||||
ClientHeight = 2325
|
ClientHeight = 2295
|
||||||
ClientLeft = 120
|
ClientLeft = 120
|
||||||
ClientTop = 465
|
ClientTop = 465
|
||||||
ClientWidth = 1950
|
ClientWidth = 2445
|
||||||
OleObjectBlob = "login.frx":0000
|
OleObjectBlob = "login.frx":0000
|
||||||
StartUpPosition = 1 'CenterOwner
|
StartUpPosition = 1 'CenterOwner
|
||||||
End
|
End
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
VERSION 5.00
|
VERSION 5.00
|
||||||
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} pricelist
|
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} pricelist
|
||||||
Caption = "Price List Name"
|
Caption = "Price List Name"
|
||||||
ClientHeight = 4590
|
ClientHeight = 5115
|
||||||
ClientLeft = 120
|
ClientLeft = 120
|
||||||
ClientTop = 465
|
ClientTop = 465
|
||||||
ClientWidth = 4110
|
ClientWidth = 4110
|
||||||
|
BIN
pricelist.frx
BIN
pricelist.frx
Binary file not shown.
Loading…
Reference in New Issue
Block a user