Skip to content

Commit

Permalink
Translate
Browse files Browse the repository at this point in the history
  • Loading branch information
DitriXNew committed Jul 6, 2023
1 parent c54a45a commit b166a8e
Show file tree
Hide file tree
Showing 14 changed files with 5,760 additions and 2,464 deletions.
110 changes: 110 additions & 0 deletions IRP/src/CommonModules/ControllerClientServer_V2/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -13231,6 +13231,114 @@ EndProcedure

#EndRegion

#Region CASH_IN_TRANSIT

#Region CASH_IN_TRANSIT_RECEIPTING_ACCOUNT

// CashInTransit.ReceiptingAccount.OnChange
Procedure CashInTransitReceiptingAccountOnChange(Parameters) Export
Binding = BindCashInTransitReceiptingAccount(Parameters);
ModelClientServer_V2.EntryPoint(Binding.StepsEnabler, Parameters);
EndProcedure

// CashInTransit.ReceiptingAccount.Set
Procedure SetCashInTransitReceiptingAccount(Parameters, Results) Export
Binding = BindCashInTransitReceiptingAccount(Parameters);
SetterObject(Binding.StepsEnabler, Binding.DataPath, Parameters, Results);
EndProcedure

// CashInTransit.ReceiptingAccount.Get
Function GetCashInTransitReceiptingAccount(Parameters, _Key)
Return GetPropertyObject(Parameters, BindCashInTransitReceiptingAccount(Parameters).DataPath, _Key);
EndFunction

// CashInTransit.ReceiptingAccount.Bind
Function BindCashInTransitReceiptingAccount(Parameters)
DataPath = "CashInTransit.ReceiptingAccount";
Binding = New Structure();
Binding.Insert("OpeningEntry",
"StepCashInTransitChangeCurrencyByReceiptingAccount,
|StepCashInTransitChangeIsFixedCurrencyByReceiptingAccount");
Return BindSteps("BindVoid", DataPath, Binding, Parameters, "BindCashInTransitReceiptingAccount");
EndFunction

#EndRegion

#Region CASH_IN_TRANSIT_CURRENCY

// CashInTransit.Currency.Set
Procedure SetCashInTransitCurrency(Parameters, Results) Export
Binding = BindCashInTransitCurrency(Parameters);
SetterObject(Binding.StepsEnabler, Binding.DataPath, Parameters, Results);
EndProcedure

// CashInTransit.Currency.Get
Function GetCashInTransitCurrency(Parameters, _Key)
Binding = BindCashInTransitCurrency(Parameters);
Return GetPropertyObject(Parameters, Binding.DataPath, _Key);
EndFunction

// CashInTransit.Currency.Bind
Function BindCashInTransitCurrency(Parameters)
DataPath = "CashInTransit.Currency";
Binding = New Structure();
Return BindSteps("BindVoid", DataPath, Binding, Parameters, "BindCashInTransitCurrency");
EndFunction

// CashInTransit.Currency.ChangeCurrencyByReceiptingAccount.Step
Procedure StepCashInTransitChangeCurrencyByReceiptingAccount(Parameters, Chain) Export
Chain.ChangeCurrencyByAccount.Enable = True;
If Chain.Idle Then
Return;
EndIf;
Chain.ChangeCurrencyByAccount.Setter = "SetCashInTransitCurrency";
For Each Row In GetRows(Parameters, Parameters.TableName) Do
Options = ModelClientServer_V2.ChangeCurrencyByAccountOptions();
Options.Account = GetCashInTransitReceiptingAccount(Parameters, Row.Key);
Options.CurrentCurrency = GetCashInTransitCurrency(Parameters, Row.Key);
Options.Key = Row.Key;
Options.StepName = "StepCashInTransitChangeCurrencyByReceiptingAccount";
Chain.ChangeCurrencyByAccount.Options.Add(Options);
EndDo;
EndProcedure

#EndRegion

#Region CASH_IN_TRANSIT_IS_FIXED_CURRENCY

// CashInTransit.IsFixedCurrency.Set
Procedure SetCashInTransitIsFixedCurrency(Parameters, Results) Export
Binding = BindCashInTransitIsFixedCurrency(Parameters);
SetterObject(Binding.StepsEnabler, Binding.DataPath, Parameters, Results);
EndProcedure

// CashInTransit.IsFixedCurrency.Bind
Function BindCashInTransitIsFixedCurrency(Parameters)
DataPath = "CashInTransit.IsFixedCurrency";
Binding = New Structure();
Return BindSteps("BindVoid", DataPath, Binding, Parameters, "BindCashInTransitIsFixedCurrency");
EndFunction

// CashInTransit.IsFixedCurrency.ChangeIsFixedCurrencyByReceiptingAccount.Step
Procedure StepCashInTransitChangeIsFixedCurrencyByReceiptingAccount(Parameters, Chain) Export
Chain.ChangeIsFixedCurrencyByAccount.Enable = True;
If Chain.Idle Then
Return;
EndIf;
Chain.ChangeIsFixedCurrencyByAccount.Setter = "SetCashInTransitIsFixedCurrency";
For Each Row In GetRows(Parameters, Parameters.TableName) Do
Options = ModelClientServer_V2.ChangeIsFixedCurrencyByAccountOptions();
Options.Account = GetCashInTransitReceiptingAccount(Parameters, Row.Key);
Options.Key = Row.Key;
Options.StepName = "StepCashInTransitChangeIsFixedCurrencyByReceiptingAccount";
Chain.ChangeIsFixedCurrencyByAccount.Options.Add(Options);
EndDo;
EndProcedure

#EndRegion

#EndRegion

#Region EMPLOYEE_CASH_ADVANCE

#Region EMPLOYEE_CASH_ADVANCE_ACCOUNT
Expand Down Expand Up @@ -13641,6 +13749,8 @@ Procedure ExecuteViewNotify(Parameters, ViewNotify)
ElsIf ViewNotify = "InventoryOnCopyRowFormNotify" Then ViewClient_V2.InventoryOnCopyRowFormNotify(Parameters);
ElsIf ViewNotify = "AccountBalanceOnAddRowFormNotify" Then ViewClient_V2.AccountBalanceOnAddRowFormNotify(Parameters);
ElsIf ViewNotify = "AccountBalanceOnCopyRowFormNotify" Then ViewClient_V2.AccountBalanceOnCopyRowFormNotify(Parameters);
ElsIf ViewNotify = "CashInTransitOnAddRowFormNotify" Then ViewClient_V2.AccountBalanceOnAddRowFormNotify(Parameters);
ElsIf ViewNotify = "CashInTransitOnCopyRowFormNotify" Then ViewClient_V2.AccountBalanceOnCopyRowFormNotify(Parameters);
ElsIf ViewNotify = "ChequeBondsOnAddRowFormNotify" Then ViewClient_V2.ChequeBondsOnAddRowFormNotify(Parameters);
ElsIf ViewNotify = "ChequeBondsOnCopyRowFormNotify" Then ViewClient_V2.ChequeBondsOnCopyRowFormNotify(Parameters);
ElsIf ViewNotify = "ChequeBondsAfterDeleteRowFormNotify" Then ViewClient_V2.ChequeBondsAfterDeleteRowFormNotify(Parameters);
Expand Down
27 changes: 27 additions & 0 deletions IRP/src/CommonModules/DocOpeningEntryClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,33 @@ EndProcedure

#EndRegion

#Region CASH_IN_TRANSIT

&AtClient
Procedure CashInTransitBeforeAddRow(Object, Form, Item, Cancel, Clone, Parent, IsFolder, Parameter) Export
ViewClient_V2.CashInTransitBeforeAddRow(Object, Form, Cancel, Clone);
EndProcedure

&AtClient
Procedure CashInTransitAfterDeleteRow(Object, Form, Item) Export
ViewClient_V2.CashInTransitAfterDeleteRow(Object, Form);
EndProcedure

#Region CASH_IN_TRANSIT_COLUMNS

#Region RECEIPTING_ACCOUNT

&AtClient
Procedure CashInTransitReceiptingAccountOnChange(Object, Form, Item, CurrentData = Undefined) Export
ViewClient_V2.CashInTransitReceiptingAccountOnChange(Object, Form, CurrentData);
EndProcedure

#EndRegion

#EndRegion

#EndRegion

#Region EMPLOYEE_CASH_ADVANCE

Procedure EmployeeCashAdvanceBeforeAddRow(Object, Form, Item, Cancel, Clone, Parent, IsFolder, Parameter) Export
Expand Down
3 changes: 2 additions & 1 deletion IRP/src/CommonModules/DocumentsClient/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ Function GetFormItemNames()
|EmployeeCashAdvanceKey, AdvanceFromRetailCustomersKey, SalaryPaymentKey, EmployeeCashAdvanceIsFixedCurrency,
|ItemListPurchaseOrderKey, ItemListSalesOrderKey,
|AccrualListKey, DeductionListKey, CashAdvanceDeductionListKey,
|ItemListConsignor, isControlCodeString";
|ItemListConsignor, isControlCodeString,
|AccountPayableOtherKey, AccountReceivableOtherKey, CashInTransitKey, CashInTransitIsFixedCurrency";
Return ItemNames;
EndFunction

Expand Down
26 changes: 15 additions & 11 deletions IRP/src/CommonModules/EquipmentFiscalPrinterServer/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,34 @@ Function PrepareReceiptDataByRetailSalesReceipt(SourceData) Export
EndIf;

If SourceData.PaymentMethod = Enums.ReceiptPaymentMethods.FullPrepayment Then
Str.Insert("PrePayment", Str.PrePayment + Payment.Amount);
Str.PrePayment = Str.PrePayment + Payment.Amount;
ElsIf SourceData.PaymentMethod = Enums.ReceiptPaymentMethods.PartialPrepayment Then
Str.Insert("PrePayment", Str.PrePayment + Payment.Amount);
Str.PrePayment = Str.PrePayment + Payment.Amount;
ElsIf SourceData.PaymentMethod = Enums.ReceiptPaymentMethods.AdvancePayment Then
Str.Insert("PrePayment", Str.PrePayment + Payment.Amount);
Str.PrePayment = Str.PrePayment + Payment.Amount;
ElsIf SourceData.PaymentMethod = Enums.ReceiptPaymentMethods.FullCalculation Then
If Payment.PaymentType.Type = Enums.PaymentTypes.Cash Then
Str.Insert("Cash", Str.Cash + Payment.Amount);
Str.Cash = Str.Cash + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.Card Then
Str.Insert("ElectronicPayment", Str.ElectronicPayment + Payment.Amount);
Str.ElectronicPayment = Str.ElectronicPayment + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.PaymentAgent Then
Str.Insert("PostPayment", Str.PostPayment + Payment.Amount);
Str.PostPayment = Str.PostPayment + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.Advance Then
Str.PrePayment = Str.PrePayment + Payment.Amount;
Else
Str.Insert("Cash", Str.Cash + Payment.Amount);
Str.Cash = Str.Cash + Payment.Amount;
EndIf;
Else
If Payment.PaymentType.Type = Enums.PaymentTypes.Cash Then
Str.Insert("Cash", Str.Cash + Payment.Amount);
Str.Cash = Str.Cash + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.Card Then
Str.Insert("ElectronicPayment", Str.ElectronicPayment + Payment.Amount);
Str.ElectronicPayment = Str.ElectronicPayment + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.PaymentAgent Then
Str.Insert("PostPayment", Str.PostPayment + Payment.Amount);
Str.PostPayment = Str.PostPayment + Payment.Amount;
ElsIf Payment.PaymentType.Type = Enums.PaymentTypes.Advance Then
Str.PrePayment = Str.PrePayment + Payment.Amount;
Else
Str.Insert("Cash", Str.Cash + Payment.Amount);
Str.Cash = Str.Cash + Payment.Amount;
EndIf;
EndIf;
EndDo;
Expand Down
43 changes: 42 additions & 1 deletion IRP/src/CommonModules/ViewClient_V2/Module.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ Procedure AccountBalanceOnCopyRowFormNotify(Parameters) Export
EndProcedure

Procedure AccountBalanceAfterDeleteRow(Object, Form) Export
DeleteRows(Object, Form, "Inventory");
DeleteRows(Object, Form, "AccountBalance");
EndProcedure

#EndRegion
Expand All @@ -1388,6 +1388,47 @@ EndProcedure

#EndRegion

#Region CASH_IN_TRANSIT

Function CashInTransitBeforeAddRow(Object, Form, Cancel = False, Clone = False, CurrentData = Undefined) Export
NewRow = AddOrCopyRow(Object, Form, "CashInTransit", Cancel, Clone, CurrentData,
"CashInTransitOnAddRowFormNotify", "CashInTransitOnCopyRowFormNotify");
Form.Items.CashInTransit.CurrentRow = NewRow.GetID();
If Form.Items.CashInTransit.CurrentRow <> Undefined Then
Form.Items.CashInTransit.ChangeRow();
EndIf;
Return NewRow;
EndFunction

Procedure CashInTransitOnAddRowFormNotify(Parameters) Export
Parameters.Form.Modified = True;
EndProcedure

Procedure CashInTransitOnCopyRowFormNotify(Parameters) Export
Parameters.Form.Modified = True;
EndProcedure

Procedure CashInTransitAfterDeleteRow(Object, Form) Export
DeleteRows(Object, Form, "CashInTransit");
EndProcedure

#EndRegion

#Region CASH_IN_TRANSIT_COLUMNS

#Region CASH_IN_TRANSIT_RECEIPTING_ACCOUNT

// CashInTransit.ReceiptingAccount
Procedure CashInTransitReceiptingAccountOnChange(Object, Form, CurrentData = Undefined) Export
Rows = GetRowsByCurrentData(Form, "CashInTransit", CurrentData);
Parameters = GetSimpleParameters(Object, Form, "CashInTransit", Rows);
ControllerClientServer_V2.CashInTransitReceiptingAccountOnChange(Parameters);
EndProcedure

#EndRegion

#EndRegion

#Region CHEQUE_BONDS

Function ChequeBondsBeforeAddRow(Object, Form, Cancel = False, Clone = False, CurrentData = Undefined) Export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,24 @@
</dcscor:item>
</appearance>
</item>
<item>
<selection>
<item>
<field>CashInTransitCurrency</field>
</item>
</selection>
<filter>
<item xsi:type="FilterItemComparison">
<left xsi:type="dcscor:Field">Object.CashInTransit.IsFixedCurrency</left>
<comparisonType>Equal</comparisonType>
<right xsi:type="xs:boolean">true</right>
</item>
</filter>
<appearance>
<dcscor:item xsi:type="SettingsParameterValue">
<dcscor:parameter>ReadOnly</dcscor:parameter>
<dcscor:value xsi:type="xs:boolean">true</dcscor:value>
</dcscor:item>
</appearance>
</item>
</ConditionalAppearance>
Loading

0 comments on commit b166a8e

Please sign in to comment.