1s 8 accumulation registers are the essence. Documents, accumulation registers, storage systems. Types of accumulation register

21.10.2022

Let's continue to consider the work of our document “Service Provision”. Until now, we have created movement accumulation registers only for document lines that contain materials. We did not take into account the services contained in the document.

The fact is that when accounting for services, completely different criteria are important than when accounting for materials. First of all, it makes no sense to talk about how many services there were and how many are left; only the amount and number of services that were provided over a certain period of time are important. In addition, the following points are interesting:

what services were provided (to create a service rating)

which particular client the services were provided to (to provide him with a discount on the volume of previously paid services,

which master provided services (to calculate his wages)

It is obvious that existing accumulation registers are completely unsuitable for solving such problems. Therefore, we will create another “storage” of data that will be used in our program - the circulating accumulation register “Sales”.

10.2. What is a negotiable accumulation register?

Accumulation registers can be balance registers and turnover registers.

The “Material Remaining” and “Material Cost” registers that exist in our training configuration are balance registers. If you remember the moment when we created the “Materials” report, then in the report designer we saw that the system creates three virtual tables for such registers: a table of balances, turnover and a cumulative table of balances and turnover.

The circulating accumulation register is very similar to the balance register, already familiar to us, for which the concept of “remainder” does not make sense. The turnover register accumulates only revolutions; the balances are without

are different. Therefore, the only virtual table that the system will create for such a register will be the turnover table.

Otherwise, the turnover register is no different from the balance register.

It should be said about one feature of the design of accumulation registers, which is directly related to the possibility of obtaining balances.

When creating a circulating accumulation register, there is no particular difficulty in determining which parameters should be the dimensions of the register - we can assign any parameters we need as its dimensions.

The situation is completely different in the case of an accumulation register that supports the accumulation of balances. For him, the choice of measurements should be made based on the fact that register movements can be carried out “in two directions”: inflow and outflow. Thus, as measurements it is necessary to choose those parameters according to which movements will accurately be carried out in both one and the other direction.

For example, if materials are accounted for in terms of item and warehouse, it is obvious that both item and warehouse can be measurements, since both the receipt and consumption of materials will always be carried out indicating a specific item and a specific warehouse. If in this situation there is a desire to reflect the accounting of materials also in the context of the supplier, then here it is necessary to proceed from the specific accounting scheme adopted at the enterprise.

Most likely, when materials are received, the supplier will be indicated, but when materials are consumed, with a high degree of probability, the supplier will not be indicated, since in most cases this is completely unnecessary information. This means that the supplier should be added as an accumulation register attribute.

If, when consuming materials, the supplier will be indicated for sure, then it makes sense to add the supplier to the register dimensions.

In other words, for each of the dimensions of the balance accumulation register, a change in resources must necessarily be carried out in both directions: income and expense.

For register details, this principle is unimportant; according to register details, resources can only be received or only spent.

Violation of this principle of constructing accumulation registers will lead to unproductive use of system resources and, as a result, slowdown and loss of performance.

10.3. Creation of a working accumulation register

Now that we know “almost everything” about accumulation registers, let’s open the configurator and create a new configuration object, accumulation register. Let's call it “Sales” and define the type of register - “Turnover”.

262. Let's create a new configuration object Accumulation register: select the object on the tree Accumulation register, MP, select Add , in the Name field enter Sales , in the Advanced List View enter Movements in the Sales register, click Next.

263. On the Subsystems tab, select Accounting, Materials Accounting, Services.

264. On the Data tab, create register dimensions:

265. Create register three resource:

Quantity, type Number, length 22, precision 2, Revenue, type Number, length 22, precision 2, Cost, type Number, length 22, precision 2.

266. Make available in the section action panel the command to view accumulation register entries: select a branch in the configuration object tree Subsystems, MP, All subsystems, in the All subsystems window on the left in the Subsystems list, select the Accounting subsystem, in the Navigation Panel group. Normal for the Sales team, turn on visibility and drag it to the group Navigation panel. See also.

267. Do the same for subsystems Provision of services and

Materials Accounting

268. Open the window for editing the configuration object Document Provision of Services and on the Movements tab we indicate that this document will create movements in the Sales register.

269. Select a tab Other, Object Module.

270. Enter the code that creates the Sales register movements produced by the Provision of Services document, highlighted in bold:

Procedure ProcessingConduct(Failure, Mode) //((__MOTION_REGISTER_CONSTRUCTOR

// This fragment was built by the constructor.

// When reusing the constructor, changes made manually will be lost!!!

Movements.RemainingMaterials.Write = True; Movement.CostMaterials.Write = True;

Movements.Sales.Record = True;

For each Tech LineList of Nomenclatures From the List of Nomenclatures Cycle

TechStringList of Nomenclature.Nomenclature.Type of Nomenclature

= Enumeration. Types of Nomenclature. Material Then

// Register Material Remaining Consumption

Movement = Movements.RemainingMaterials.Add();

Movement.Period = Date;

Movement.Warehouse = Warehouse;

Movement = Movements.MaterialsCost.Add();

Movement.MovementType = AccumulationMotionType.Expense;

Movement.Period = Date;

Movement.Material = TekStringList of Nomenclature.Nomenclature;

Movement.Cost = TechStringListItems.Quantity*TechStringListItems.Cost;

endIf;

Movement = Movements.Sales.Add(); Movement.Period = Date;

Movement.Nomenclature = TechStringList of Nomenclature.Nomenclature;

Movement.Client = Client; Move.Master = Master;

Movement.Quantity = TechStringList of Nomenclature.Quantity;

Movement.Revenue = TechLineList of Items.Amount;

Movement.Cost = TechStringListItems.Cost*TechStringListItems.Quantity;

EndCycle; //))__CONSTRUCTOR_MOVEMENT_REGISTERS

End of Procedure

271. Let's launch 1C:Enterprise in debug mode, open the document Provision of Services dated July 27, click Conduct, go to the list of movements in the Sales register.

272. Open the document Provision of Services dated July 29, click Proceed, go to the list of movements in the Sales register.

273. Open the document Provision of Services dated July 29, click Proceed, go to the list of movements in the Sales register.

11th day. Reports 11.1. Methods to access data

The 1C:enterprise system supports two ways to access data stored in the database:

object (read and write)

tabular (for reading).

The object way of accessing data is implemented through the use of built-in language objects. At the same time, when accessing any object of the built-in language, we access a certain set of data located in the database as a single object.

For example, the DocumentObject.Service Provision object will contain the values ​​of all the details of the Service Provision document and all its tabular parts.

Tabular access to data is implemented using database queries, which are compiled in a query language. Here the developer gets the opportunity to operate with individual fields of the database tables in which certain data is stored.

11.2. Working with requests

To generate and execute queries to database tables, the system uses a special Request object. The query is convenient to use when you need to obtain a complex data sample, grouped and sorted in the desired way. One of the classic examples of its application is a summary of the state of the accounting register at a certain point in time. In addition, the query mechanism makes it easy to obtain information in different time frames.

11.3. Query Data Sources

The query receives initial information from a set of tables.

All tables that the query language operates on can be divided into two groups:

real tables

virtual tables.

Real tables contain data from any one real table stored in a database.

For example, the real table is Directory.Clients corresponding to the Clients directory.

Virtual tables are formed mainly from data from several database tables. For example, the virtual table is Accumulation Register.Material Remainings.RemainingsAndTurnover, formed from several tables of the accumulation register Material Remaining.

What they have in common is that they can be given a number of parameters that determine what data will be included in these virtual tables.

Virtual tables are not stored in the database.

Real tables are divided into object (reference) and non-object.

Object tables provide information about reference data types (directories, documents, etc.). And in non-object ones - all other data types (constants, registers, etc.).

A special feature of object tables is that they include a Link field containing a link to the current record.

11.4. Query language

The algorithm by which data will be selected from the input query tables is described in a special language - the query language.

The request text may consist of parts:

1. request description

2. query merging

3. ordering results

4. auto-ordering

5. description of the results.

The only required part is the description of the request.

Query description – defines data sources, selection fields, groupings, etc.

Query merging – determines how the results of executing several queries will be combined.

Result ordering—defines the ordering conditions for query result rows.

Auto-ordering allows you to enable automatic ordering of query result rows.

Description of totals – determines which totals need to be calculated in the query and how to group the result.

Data composition system

The data composition system is designed to create custom reports.

The source data for the report layout contains the data layout diagram. These are data sets and methods for working with them.

The developer creates a data composition scheme in which he describes the request text, data sets, connections between them, available fields, data retrieval parameters, and sets the initial layout settings - report structure, data layout, etc.

The developer creates a data layout scheme and default settings.

Based on the layout and settings, the layout builder creates a layout.

The data composition processor selects data from information security according to the layout layout, aggregates and formats this data.

The layout result is processed by the output processor, and as a result, the user receives the resulting spreadsheet document.

11.5. Selecting data from one table

274. Let's create a report: select the Reports, MP branch in the configuration object tree, select Add, enter in the Name field

Register of Documents Provision of Services , press tab and in the field The synonym should appear Register of Documents Provision of Services , in the advanced view field, enter List of services provided,

275. click Open with data composition diagram

276. Add a new data set - query: click the Add button, select.

277. Create a request text: click the button Request constructor

sa.

278. Provision of Services, from this table we select the fields Warehouse,

279. Select a tabAssociations/Aliases, indicate that the Link field will have the Document alias.

280. Select a tab Order, specify that the query result should be ordered by the value of the Document field.

281. Click OK.

Provision of Services. Warehouse,

Providing Services. Master,

SORT BY

Document

Provision of Services. Warehouse,

Providing Services. Master,

Document.Provision of Services HOW to ProvideServices

SORT BY

Document

Description of the request Result ordering (ascending by default) List of selection fields

After AS data source alias Data sources

282. select settings tab, select Report, MP, New

grouping.

283. On the Selected fields tab, move the fields with the mouse.

284.

285. In the window for editing the configuration object Report Document RegistryProvision of Services, select the Subsystems tab, select Provision of Services.

286. Let's launch 1C:Enterprise in debug mode, in the action panel of the Provision of services section, select Register of documents for the provision of services, click Generate.

We see that the report contains a register of documents Provision of services. Moreover, by double-clicking on the Document field, we can open the source document and also perform other actions.

11.6. Selecting data from two tables

286. Let's create a report: select a branch in the configuration object tree Reports, MP, select Add, enter Service Rating in the Name field, press tab and it should appear in the Synonym field

287. click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

288. Add a new data set - query: click the Add button, select Add Dataset - Query.

289. Create a request text: click the button Request constructor

sa.

290. As a data source for the request, select the object table Nomenclature and the virtual table of the accumulation register SalesTurnover.

290. Let's rename the Nomenclature table to sprNomenclature

291. Let's move the fields SprNomenclature.Link and SalesTurnover.RevenueTurnover to the list of fields.

292. select the communications tab. Since the query involves several tables, it is necessary to determine the relationship between them.

By default, the platform has already created a connection for the Nomenclature field. That is, the values ​​of the Nomenclature dimension of the Sales register must be equal to the reference to the Nomenclature directory element.

293. Uncheck the All checkbox for the SalesTurnover table and set the SprNomenclature table.

This type of connection will be a left join, that is, the result of the request will include all records in the Nomenclature reference book and those records in the Sales register that satisfy the connection condition for the Nomenclature field.

As a result of the request, all services will be present, and for some of them the revenue turnover will be indicated.

294. Select the Conditions tab and set the selection so that the groups in the Nomenclature directory do not appear in the report.

295. Select the standard nomenclature, select the ThisGroup field, check the Custom checkbox, and enter the code in the Condition field:

sprNomenclature.ThisGroup = FALSE

296. Another condition is that the selected item is a service. This is a Simple condition. Drag the Item Type field to the list of conditions. The platform will automatically generate a condition according to which the item type must be equal to the value of the Item Type parameter. Next, before executing the request, we will pass the enumeration value – Service – to the Nomenclature Type parameter.

297. Select the Merge/Aliases tab, the Link field will have an alias Service, and the register field is Revenue.

298. Select a tab Order, select Revenue, specify that the query result should be sorted in descending order of the revenue field value.

299. Click OK.

SalesTurnover.RevenueTurnover AS Revenue FROM

Directory.Nomenclature AS referenceNomenclature

LEFT CONNECTION RegisterAccumulations.Sales.Turnover AS SalesTurnover

Software SalesTurnover.Nomenclature = referenceNomenclature.Link

WHERE sprNomenclature.ThisGroup = FALSE

And sprNomenclature.Type of Nomenclature = &Type of Nomenclature-

ORDER BY Revenue DECREASE

In the data composition system, resources refer to fields whose values ​​are calculated based on the detailed records included in the grouping. Resources are group or overall report totals.

300. Select the Resources tab, select Revenue, select >> to have the designer select all available resources for which the total can be calculated. For us, this is the Revenue resource.

Options

The user is interested in information about economic activity for a certain period. Therefore, any report has parameters that specify the beginning and end of the reporting period.

Report parameters set the conditions for selecting records for the report.

301. Select a tab Options

302. We will relieve the user of the need to specify the time when entering the date of the period for which the report is generated: select the Date, M2 field in the Start of Period line, select Date in the Date Composition list, click OK.

303. For the End of Period parameter, select the Availability restriction checkbox.

304. click the Add button, enter End Date in the Name field, select Date in the Type list, specify Date Composition – Date.

305. Select the End of Period parameter, enter the expression in the Expression field

EndPeriod(&EndDate, "Day")

306. Select line Type of Nomenclature, In the list of the Value column, select Service.

Settings

307. select the settings tab, select Report, MP, New grouping.

A grouping of detailed records will appear in the report structure.

308. On the Selected fields tab, move the mouse to the fields Service, Revenue.

309. Select the Other Settings tab, enter the report title – Service Rating.

Quick custom settings

310. Select a tab

311.

312. For the Start Date field, in the Values ​​list, select Start of this month.

313. For the End Date field, in the Values ​​list, select Start of this day.

314. Let's close the data composition schema designer.

315. In the window for editing the configuration object Report Service Rating, select the Subsystems tab, select Provision of services.

316. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service rating.

Symbol

317. In the configurator, open the data composition scheme on the Settings tab, select the tab at the bottom of the window Symbol, Click the Add button.

318. In the Design field, select burgundy text color, click-

319. Then we indicate the Condition upon the occurrence of which the design will be applied, select New element, click the Add button, in the Left value column indicate Revenue, in the Comparison type column indicate Less, in the Right value column indicate 700,

click OK.

That is, when the Revenue field has a value less than 700, something will be highlighted in red.

320. Now let’s set the list of fields to be created: in the Form fields field, click three dots, click Add, select Service, select Revenue, click OK.

321. In the Symbol Representation field, enter Unpopular service. This is what the user will see in their settings.

322. Now let’s add the created condition to the user settings: click the button Custom Element Properties

settings , check the box Include in user settings and set the property Edit mode to value

Ordinary.

We've included the conditional appearance setting we created in the normal user settings. These settings, unlike quick settings, are not located in the report form, but are called up by clicking the Settings button.

323. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service rating, click Generate.

We see that the amount of services is less than 700 rubles. highlighted in red.

323. Click the Settings button, uncheck the Unpopular service setting, click Finish editing.

324. Click create, you see the color highlighting has disappeared.

Custom Settings

325. In the configurator on the tab Data composition schema settings contain complete report settings that are specified by the developer. Some of them can be presented to the user to create a random selection, conditional report design, etc.

326. Click the Custom Settings Item Properties button located at the top of the command panel of the settings window.

327. Set the usage flag for settings Selection and Conditional design and set their edit mode to

value Normal, click OK.

328. Select the Selection tab, expand the Service field, select the Parent, M2 field, and drag it to the selection list on the right side of the window.

We have created the ability to select by groups of services that the user can set in 1C:Enterprise mode.

329. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service Rating, click Settings, the Selection and Symbol settings appear there.

We created the Unpopular service setting in advance in the configurator. And now, having added the conditional notation setting in general,

We provided the user with the ability to create any number of their own conditions.

330. Let's set the selection in the report so that it includes the following services related to the installation of washing machines: click three dots in the user settings window in the Selection line: in the Selection line, click three dots, in the Value line, click three dots, expand the Services group and select Washing machines from the Nomenclature directory, click OK, click Finish editing, click Generate.

The report only includes installation services for washing machines.

331. Click Settings, in the Selection line, click the Cleaning button.

11.7. Report 3. Displaying data for all days in the selected period

The Craftsmen's Revenue report will contain information about how much revenue the LLC received thanks to the work of the craftsmen, with details by day in the selected period and a breakdown of the clients served on each day.

331. Let's create a report: select the Reports, MP branch in the configuration object tree, select Add, enter in the Name field RevenueMasters, press tab and in the Synonym field the revenue of the mothers should appear, in the expanded view field enter the List of services provided,

332 click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

333. Add a new data set - query: click the Add button, select Add Dataset - Query.

334. Create a request text: click the button Request constructor

sa.

335. As a data source for the request, select the virtual table of the accumulation registerSales.Turnover.

336. In the Tables field, select Sales.Turnover, click the Virtual table parameters button, select Day in the Frequency list, click OK.

337. Select fields from table SalesTurnover.Master, Pro

salesTurnover.Period, SalesTurnoverClient, SalesTurnover.RevenueTurnover.

338. Select a tabAssociations/Aliases, indicate that field SalesTurnover.RevenueTurnover will have the alias Revenue, click OK.

SalesTurnover.Master,

SalesTurnover.Period,

SalesTurnover.Customer, SalesTurnover.RevenueTurnover AS Revenue

RegisterAccumulations.Sales.Turnover(, Day,) AS SalesTurnover

339. Select the Resources tab, select Revenue.

Options

340. Select the Parameters tab, for the Start of Period parameter enter Heading Start Date, in the Type field select the composition of the date Date.

342. Add the EndDate parameter, Date type, date composition –

343. For EndPeriod, specify the expressionEndPeriod(&EndDate, “Day”)

and the Restrict availability check box. Settings

344. Select the Settings tab, select the root element Report, click Add, add a top-level grouping by the Master field, add a grouping nested in the previous one by the Period field, add another grouping nested in the Detailed records grouping by the Period field without specifying a grouping field.

345. Select the Selected Fields tab, add the fields Customer, Revenue.

346. Select the Other Settings tab, in the Grouping Fields Location list, select Separately and only in totals, in the Vertical Location of General Tiogs list, select Start, and in the Heading field, enter Mater Revenue.

347. Select a tab Options, select Start Date, click Custom Settings Item Properties, enable the Include in Custom Settings check box, click OK.

348. Select the Options tab, select End Date, click Custom Settings Item Properties, select the Include in Custom Settings check box, and click OK.

349. In the window for editing the configuration object Report Masters' Revenue, select the Subsystems tab, select Provision of services and Payroll.

350. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Craftsmen's Revenue, set the period from July 1 to July 30, click Generate.

Displays all dates in the selected period

We only show those days for which there is non-zero data in the Sales accumulation register table. We need to show data with detail for all days in the selected period.

351. In the data composition scheme, select Settings, select the Period grouping, click the Period tab in the command bar of the window.

352. Select the Grouping Fields tab, select the Period field,

V In the Add-on Type list, select a day.

353. In the new row in the Period Start Date column, M2, click the Clear button, click the T data type selection button, select Data Composition Field, click OK, select the three dots, select the Period Start option.

354. In the new row in the Period End Date column, M2, click the Clear button, click the T data type selection button, select Data Composition Field, click OK, select the three dots, select the End Date option.

355. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Craftsmen's Revenue, set the period from July 1 to July 30, click Generate.

New version of the report. Diagram

Logically, a diagram is a collection of points, series, and series values ​​at a point.

Moments or objects for which we obtain characteristic values ​​are used as points, and characteristics whose values ​​interest us are used as series. At the intersection of the series and the point is the value of the chart.

For example, a diagram of sales of product types by month consists of points - months, series - product types and values ​​- sales turnover.

A diagram as an object of the built-in language has three areas: the construction area, the title area, the legend area

356. Open the data composition scheme on the Settings tab, select Add in the list of report options, enter the name Revenue Volume.

357. Let's add a chart to the report structure: select the root element Report, MP, New Chart.

358. Select the branch Points, MP, New grouping, select the Master field.

359. Select Selected Fields, click Report, select

360. Select the Other Settings tab, select Chart Type – Measurement.

361. Select the stripes of the measurement diagram according to Fig.

362. Select a tab Options, select Start Date, click Custom Settings Item Properties, enable the Include in Custom Settings check box, click OK.

363. Select the Options tab, select End Date, click Custom Settings Item Properties, select the Include in Custom Settings check box, and click OK.

364. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Provision of services section, select Masters' Revenue, click select option, select Revenue Amount, click

11.8. Report 4. Obtaining current values ​​from the periodic information register

The report will contain information about what services the LLC provides and at what price.

365. Let's create a report: select the branch Reports, MP in the tree of configuration objects, select Add, in the Name field enter List of Services, press tab and in the Synonym field List of services should appear, in the advanced view field enter List of services provided,

366 click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

367. Add a new data set - query: click the Add button, select Add Dataset - Query.

368. Create a request text: click the button Request constructor

sa.

369. Select the object table as the data source for the query Nomenclature and virtual table of the register of information Prices. Latest Cut.

370. Rename the Nomenclature table to sprNomenclature.

371. In the Tables field, select Prices.CuttingLatest, click the Virtual table parameters button, in the Period field enter &ReportDate.

372. Select fields from table sprNomenclature.Parent,

373. Select the Links tab, uncheck the All checkbox for the register table, and enable the All checkbox for the lookup table.

374. Select the condition tab, select the Item type field,

375. Select the Association/Aliases tab, replace the Parent field with Service Group, Link to Service field, click OK.

SELECT sprNomenclature.Parent AS Service Group,

FROM Directory.Nomenclature AS referenceNomenclature

LEFT JOIN RegisterInformation.Prices.SliceLast(&ReportDate,) AS PricesSliceLast

Software (PricesSliceLast.Nomenclature = referenceNomenclature.Link)

WHERE referenceNomenclature.Type of Nomenclature = &Type of Nomenclature

376. Select the Resources tab, select Price.

377. Select the Parameters tab, for the Item Type parameter in the Value column, select Service.

378. For the Report Date parameter, remove the availability restriction (Og), in the Type field, select the date composition – Date.

379. For the Period parameter, set the availability limit.

380. Select the Settings tab, select the root element Report, MP, New grouping by the Service Group field, Hierarchy grouping type.

379. Select the grouping GroupServices, MP, New grouping without specifying the group field (Detailed records).

380. Select Selected fields, specify the fields Service, Price.

381. Select Other Settings, Vertical Grand Totals select None.

382. Select the Services Group tab, in the Location of grouping fields list, select Separately and only in totals, and in the Heading field, enter List of services.

383. Select a tab Options , select Report date, click Custom Settings Item Properties, turn on the Include in custom settings check box, click OK.

384. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services and Accounting.

385. Open the periodic Prices register, add a new value for the Diagnostics service for July 27 - 350 rubles.

386. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select List of services, enter the date July 26, click Generate, the diagnostic price should be 600.

387. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select List of services, enter the date July 27, click Generate, the diagnostic price should be 350.

11.9. Report 5: Using a calculated field in a report

388. Let's create a report: select the branch Reports, MP in the tree of configuration objects, select Add, enter Client Rating in the Name field, press tab and it should appear in the Synonym field Customer rating, in the advanced view field, enter List of services provided,

389. Click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

390. Add a new data set - query: click the Add button, select Add Dataset - Query.

391. Create a request text: click the button Request constructor

sa.

392. As a data source for the request, select the virtual table of the savings register Sales.Turnover.

393. Select fields from table

SalesTurnover.Client

SalesTurnover.RevenueTurnover

393. Select the Association/Aliases tab, replace the RevenueTurnover field with Revenue, CostTurnover with Cost.

394. Click OK.

395. Select the Calculated Fields tab, click the Add button, enter Revenue in the Data Path field, and enter Revenue in the Expression field.

Revenue - Cost

396. Select the Resources tab, select Revenue, Income, Cost

397. Select the Settings tab, select the root element Report, MP, New Chart.

398. Select Points, MP, New grouping by Client field.

399. Select Selected Fields, select Revenue.

400. Select Other settings, chart type – 3-D pie, enter Customer Rating in the title field.

401. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services and Accounting.

402. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Customer rating, click Generate.

11.10. Report 6. Outputting data to a table

Let's create a universal report to allow the user to change its structure and appearance.

403. Let's create a report: select the Reports, MP branch in the tree of configuration objects, select Add, enter Universal in the Name field, press tab and Universal should appear in the Synonym field, enter List of services provided in the expanded view field,

404. Click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

405. Add a new data set - query: click the Add button, select Add Dataset - Query.

406. Create a request text: click the button Request constructor

sa.

407. As a data source for the request, select the virtual table of the accumulation register Sales.Turnover.

408. Select fields from table

SalesTurnover.Nomenclature

SalesTurnover.Client

SalesTurnover.Master

SalesTurnover.QuantityTurnover

SalesTurnover.RevenueTurnover

SalesTurnover.CostTurnover

409. Click OK.

410. Select the Resources tab, select >>.

411. Select the Settings tab, select the root element Report, MP, New Table.

412. Select the Table element in the structure and click the Custom Settings Element Properties button. Select Selected Fields, Row Grouping, Column Grouping.

413. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services.

414. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Universal, click Generate. Empty!

415. In the Selected fields line, click the three dots and select RevenueTurnover.

416. In the Lines line, click the three dots, add a grouping by the Nomenclature field with the Hierarchy type.

417. In the Columns row, add a grouping by the Master field.

418. Click Generate.

419. In the Selected fields line, click the three dots and select CostTurnover.

420. In the Lines line, click the three dots, delete the grouping by the Items field, enter the grouping by the Customer field.

421. Click Generate.

422. In the Selected fields line, click the three dots and delete CostTurnover.

423. In the Lines line, click the three dots, delete the old grouping, enter a grouping by the Nomenclature field with the Hierarchy Only type.

424. In the Columns line, add a grouping by the Customer field, and place it first..

425. Click Generate.

the cost of the materials available in the organization, we will need to access the documents, look through each of them, writing out the necessary data, and then summarize them, obtaining the necessary data. This approach is inconvenient - it is too slow both for our imaginary “manual” case and for automated accounting.

It would be more logical, in addition to documents, to keep special tables in which, when receiving materials and when writing them off, to enter brief information about this. If, say, on a daily basis, you summarize these tables and display the remaining materials, then, in order to say how much and what materials the organization has on a certain date, it is enough to refer to the corresponding column of the table. In the 1C:Enterprise system, such tables are accumulation registers. As the name suggests, they are designed to reflect, accumulate, and certain indicators. And reflection in the registers of receipt and consumption of materials is one of the typical examples of their use.

Our organization keeps records of materials in connection with the responsible persons who receive them and from whom these materials are written off when released into production. We need to store information about the quantity of materials and their cost, and also, when written off for production, have information about which particular craftsman these materials were transferred to. These considerations allow us to design the structure accumulation register, which we will now create.

When planning a squad accumulation register we need to understand exactly what data we are going to store in it, and then “decompose” this data into dimensions, resources and register details.

So, we need to store the following data:

  • Nomenclature position
  • Responsible employee for this position
  • Quantity of items
  • Item cost
  • Data about the master to whom the materials were transferred for use.

Register measurements, or the cuts in which data is stored, allow us to answer questions about what data is stored in the ledger. In our case, we need to know two main characteristics - this is what responsible person fixed one way or the other nomenclature position. Obviously, the dimensions from our data list will be item item and responsible employee.

Registry Resources– these are always numerical values ​​characterizing the stored data. Numerical values ​​are quantity and sum, and they will be the resources of our register.

Register details play a supporting role, and, in our case, it would be logical to store in the register details information about the craftsman who received the materials for the work - in case we need to find out who exactly used these materials.

Another important question The thing that needs to be decided when designing a register is whether the register will be balance register or revolution register. We are interested in both information about the remaining materials and information about turnover, so when setting up the register, you should specify the type of register - Leftovers. Register with a view Leftovers allows us to work with both balances and turnover

The structure proposed here accumulation register– this is just one of the options for how to organize the storage of the described data. Such an accounting scheme can be implemented, say, using a pair of registers, one of which is used exclusively for the purpose of storing the total balances of materials - that is, the data that is needed for financial reports, the other is for storing data by responsibility centers. In any case, each specific accounting scheme may require its own register structure, and our example is just a demonstration of one of the possible options.

Having discussed the theoretical part of the issue, let's move on to practice. Let's create a new one accumulation register, let's call it Remaining Materials, parameter Register type let's leave it at that value Leftovers, rice. 6.12.


Rice. 6.12.

Let's turn it on accumulation register into the subsystem Operational Materials Accounting.

On the tab Data Let's create the following dimensions, resources and details:

Measurements:

Name: Nomenclature, Type: DirectoryLink.Nomenclature, Prohibition of blank values ​​– set.

Name: ResponsibleEmployee, Type: DirectoryLink.Employees, Prohibition of empty values ​​– set.

Resources

Name: Quantity, Type: number, length 10, precision 3

Name: Sum, Type: number, length 10, precision 2

Requisites:

Name: Recipient of Materials, Type: DirectoryLink.Employees

Pay attention to the names of these details, their types, as well as the standard register details (Fig. 6.13.) - this data will be useful to us when working on the procedure carrying out the document.

Let’s exclude the general attribute from the register details Organization. There is no need for it now. To organize the storage of data in the register across various organizations, we would need a new dimension - Organization, thanks to which we would be able to work with materials from various organizations.

Let's go to the tab Registrars window for editing an object and select documents as recorder documents - Receipt of Materials And Release of Materials to the Master.

At this stage the setup accumulation register finished, let's move on to document settings. Let's start with the document Receipt of Materials.

Open the object editing window for this document, go to the tab Movements(Fig. 6.14.) and press the button


Rice. 6.14.

In the constructor, select the type of register movement - Coming, in field Tabular part let's indicate tabular part document Materials, click on the button Complete expressions. The automatic mechanism for establishing a correspondence between document and register data does not always work correctly (in the event that it cannot unambiguously determine the correspondence, or when the correspondence determined by it according to its logic differs from the desired one), so we will check the correctness of the established correspondences. As a result, the window Designer register movements should look like shown in Fig. 6.15.


Rice. 6.15.

After clicking the OK button, the following execution processing procedure will be generated in the document object module (this is how it looks after removing the comments that the code was built by the motion designer):

Procedure ProcessingProcessing(Failure, Mode) // register Remaining Materials Arrival of Movement. Remaining Materials. Write = True; For Each TekStrowMaterials From Materials Cycle Movement = Movements.RemainingMaterials.Add(); Movement.MovementType = AccumulationMovementType.Incoming; Movement.Period = Date; Movement.Nomenclature = TexStringMaterials.Nomenclature; Movement.ResponsibleEmployee = ResponsibleEmployee; Motion.Quantity = TechStringMaterials.Quantity; Movement.Amount = TexStringMaterials.Amount; EndCycle; End of Procedure

This procedure is declared in the object module, it is executed on

Any task accounting system— storage and prompt display of information for the user, i.e. The goal of any system design is to promptly provide the user with a report. With the help of the data obtained, as a rule, management decisions are made at enterprises.

Let's assume that we have 1000 different documents: receipt of goods, write-off, return, sale, etc. And each of the documents changes the quantity of a certain product in the warehouse. To get information about the current quantity in the warehouse, you need to go through everything: some increase the quantity of goods, some decrease, some can increase or decrease. And if it is also necessary to take into account the warehouse, the organization?.. Such a system is very resource-intensive.

To simplify this process 1C developers came up with special configuration objects. They are used for the convenience of storing and retrieving information; in 1C 8.3 and 8.2 all kinds of registers are used; in this article we will talk specifically about Accumulation registers.

The accumulation register itself is a table with information that collects all movements (receipts/write-offs or turnover) of certain documents. Let's look at what the movement table looks like using the example of a typical accumulation register “Goods in warehouses” in the “Trade Management 10.3” configuration:

Here we see that 1C “Sales” documents reduce the quantity of a certain product in a certain storage location, and receipt documents, on the contrary, increase the quantity. As a result, we get an overall picture in which we can clearly see what, when and in what quantity was received (written off) according to accounting. It is much more convenient to build a report using such a table.

Accumulation register in the configurator

What is an accumulation register from the point of view of configuration development? Let's start by looking at the fields of the accumulation register in:

Get 267 video lessons on 1C for free:

The accumulation register has Dimensions, Resources, Details and Standard details.

Let's first consider the standard details of the accumulation register:

  • period— the date of movement does not have to coincide with the date of the document;
  • registrar- a document that makes an entry in the register;
  • line number— serial number of the line in the record set, unique within the registrar;
  • activity— is responsible for getting records into virtual tables (more about them below);
  • viewmovement- income or expense.

Accumulation register measurements

A dimension is a section in which records are kept. In the above example, the accounting section is: warehouse, nomenclature, product characteristics, product series, quality. That is, by specifying the measurements we are interested in, we can obtain the quantity—resource—at any time. In the context of different dimensions, in the future, for example, you can obtain balances for a specific date.

Accumulation register resource

A resource is a numeric field in which information is stored in the context of the dimensions described above.

Otherwise, the interactions of dimensions/resources can be schematically depicted as a coordinate system:

Two dimensions - abscissa and ordinate of the coordinate system, i.e. in this example, the dimensions are warehouse and item. At the intersection of dimensions we can get a quantity - a resource. For example, at the “main” warehouse of the product “pencil” there is 1 piece in stock.

Details of the accumulation register 1C

Accumulation register details serve as a “comment” or additional information; in terms of measurements, balances/turnovers cannot be obtained. Used quite rarely.

Types of accumulation register

There are two types of accumulation register − turnovers and balances.

If the purpose of the accumulation register is not to obtain balances, it is necessary to use the type of accumulation register - rpm. A typical example of using a turnover register is recording sales volumes. In this case, we only need to know what sales were over a certain period of time; balances in this case do not make sense.

If the purpose of using the accumulation register is to obtain balances for a certain period, we need a register with the form leftovers. This type allows you to receive both balances and turnover. For such a register, the system automatically calculates balances. An example of a “residual” register is goods in warehouses, money in the cash register.

Using a register type leftovers where you can get by rpm, is considered a blunder in the design of the accumulation register from a system performance perspective.

Depending on the type of register, the system will create different virtual tables for the accumulation register. Virtual table – quick way obtaining profile information from registers.

For the accumulation register it is:

  • Leftovers;
  • Revolutions;
  • Remains and turnovers.

For the solution developer, the data is taken from one (virtual) table, but in fact the 1C platform takes it from many tables, transforming them into the required form.

Proper design of accumulation registers

Accumulation registers must be designed from the required reports. The most difficult thing in the 1C 8.3 system is storing information correctly so that it can be easily retrieved at any time.

Among the features of register design, it should be noted the need to correctly arrange the dimensions in the register. Above all, you need to put the measurements that will be requested most often in the system.

Indexing accumulation register dimensions

Accumulation register measurements have the property of “indexing”. This property must be set to measurements in cases where it is planned to frequently apply selections for the measurement when receiving data and this measurement may have a large number of meaning options.

For example, the register is “ProductsInWarehouses”, the dimensions are “Warehouse, Nomenclature”, the resource is “Quantity”.

It is more correct to index the “Nomenclature”, but the “Warehouse” field should not be indexed, because the number of warehouses in the system, as a rule, is not significant.

1C accumulation register this is a structured data set that contains information about all movements (receipt / expense or turnover) of selected documents.

Types of accumulation register

In 1C there are only two types of accumulation register:

  • Revolutions
    If you plan to receive only revolutions from the register, be sure to set the type to revolutions.
    For example, when registering sales, the number of sales is important to us and balances are absolutely not needed here. Therefore, the register type must be set to “Revolutions”.
  • Leftovers
    If you plan to receive balances and turnover from the register, set the type to balances. For example, let’s take the accumulation register “GoodsInWarehouses” in it important information there will be both balances and turnovers. Therefore, the register type must be set to “Balances”.

Attention: no right choice type of accumulation register will result in low performance of the information base.

Dimensions, Resources, Details and Standard Details

Any accumulation register contains dimensions, resources, details and standard details.

Measurements are needed to generate key record data, from which in the future you can obtain balances or view turnover for the dimensions you are interested in.
You can also set the measurement properties to check whether the measurement is filled in (an empty value will cause an error)

Resources needed to store summary data in a register: quantity, amount, etc. In the future, we will receive resources by measurements.

Requisites are mainly needed to store related information and are rarely used.

Standard details are as follows:

  • period - the date when the register movement was performed
  • registrar - a document with which an entry was made in the register
  • type of movement - income or expense (arrival increases the amount of resources, and expense decreases)

Registrars

Registrars are documents that can make movements in the accumulation register. Movements to the 1C accumulation register can only be made using documents (registrars). Most of the algorithms for creating movement in the accumulation register are formed when posting a document in the object module, the “Processing Posting” procedure.


Indexing dimensions

Indexing is required to increase the performance of the information base.
The “Index” property must be specified for dimensions for which you plan to perform multiple selections and which have a large number of elements.

For example: the accumulation register “Lots of Goods in Warehouses”. There is a dimension “Nomenclature” and “StatusParties”. It is more expedient to set the indexation attribute for the “Nomenclature” dimension than for “Part Status”, since the number of nomenclature options is much higher than for batch status.

Uniqueness of records

1C Enterprise controls the uniqueness of entries in the accumulation register, and therefore you will not find two identical entries.

Capabilities of the accumulation register

  • a selection of records for a certain period according to specified dimensions
  • selection of records by registrar
  • obtaining balances and turnover for a selected date with specified measurements
  • calculating totals for a specified date

Examples of working with the accumulation register

An example of obtaining balances for the current date

Procedure GetBalanceOnDate()
NewRequest = New Request;
NewQuery.Text =
"CHOOSE
| Commodity Remains.Nomenclature,
| ItemRemaining.QuantityRemaining
|FROM
| RegisterAccumulation.GoodsInWarehouses.Remains(&CurrentDate,) AS ProductRemains";
NewQuery.SetParameter("CurrentDate", CurrentDate());

EndCycle;
End of Procedure

An example of obtaining turnover for the current year

NewRequest = New Request;
NewQuery.Text =
"CHOOSE
| CommodityTurnover.Nomenclature,
| CommodityTurnover.QuantityTurnover
|FROM
| Accumulation Register.GoodsInWarehouses.Turnover(&StartPeriod, &EndPeriod,) AS Turnover";

New Query.SetParameter("Start of Period", Start of Year(CurrentDate()));
NewQuery.SetParameter("ConPeriod", CurrentDate());

SelectQuery = NewQuery.Execute().Select();

While QuerySelect.Next() Loop
EndCycle;

Example of how to select movements in the accumulation register

NewRequest = New Request;
NewQuery.Text =
"CHOOSE
| ProductsInWarehouses.Period,
| GoodsInWarehouses.Registrar,
| Products in Warehouses. Type of Movement,
| Products in Warehouses. Nomenclature,
| ProductsIn Warehouses.Quantity
|FROM
| Accumulation Register.GoodsInWarehouses AS GoodsInWarehouses";

SelectQuery = NewQuery.Execute().Select();

While QuerySelect.Next() Loop
EndCycle;

Accumulation register list forms

Forms are used to visually view all movements of a selected register. In it you can see which documents record the expense or receipt, and also see what measurements are used. You can also sort movements or make selections there.
The system will automatically generate a list form or you can customize it yourself.

For example, let's assume that the data will be taken from documents. In this case, every time when forming any the program would need a report go through all documents, extract data from them and only then, based on this data, create the requested report.

Obviously, such an approach to generating reports would be ineffective. Therefore, in practice, there is such a thing as holding a document. When posting a document (as opposed to simply recording it in the 1C database), based on the 1C form filled out by the user, Accounting creates so-called postings, that is, it makes one or more entries in one or more registers.

1C registers are simply tables containing columns and rows. The principle is the same as with Excel tables or regular “paper” tables.

Movement of a document through registers - these are the entries made by a document into registers when posted, called.

It is from these registers that data is taken when generating various reports. This much faster than going through all the documents. It is for this reason that you should always be careful not only when filling out the document form, but also, if necessary, control the transactions generated by the document.

There was an important part of the article, but without JavaScript it is not visible!

Types of 1C Accounting registers

In fact, registers in 1C: Accounting are used not only for storing document postings, but also for various other purposes. In this regard, there are several species registers:

  • Information registers
  • Accumulation registers
  • Calculation registers
  • Accounting registers

The last type of register stores accounting entries documents. How all these differ from each other and why, I tell you in the course I teach, Enterprise Accounting 8. Here I will give again a list of existing 1C registers, only in the form of a screenshot (using the example of 1C Accounting 8.2).


But the same thing using the example of 1C: Accounting 8.3:

website_

Viewing 1C Accounting registers

It never hurts to know where exactly certain registers are located in the program and why each of them is needed. Well, at least because one day ( and very easily!) you may need to review them in order to find and correct errors in accounting (a typical task when closing a month).

Any of the registers can be opened using the forms I provided above. That is, from a general list of registers of a certain type. As an example, I will give the most famous register - the accounting register. However, this name is more technical, since for the user it is called Posting journal.

website_

When you open any register, the data there is displayed "in the shared heap". They can be filtered according to the parameters you need in exactly the same way as you can do with documents.

Making changes to registers

If you take another look at the fragment of the contents of the 1C Enterprise accounting register in the figure above, you will notice the absence of a button Add. The fact is that Not all registers can be entered directly, i.e. open it and add elements (rows) manually, as you can do with documents or reference books.

A quick question: did you know that in some directories you also cannot enter data through everyone’s favorite “Add” button. Why do you think?

Here is an example of a simple information register into which entries can be made manually. Using such registers is, of course, easier.

website_

If there is no button in the register Add, then data in such registers is entered only by so-called registrars. The meaning of the concept of a registrar is illustrated by the same picture with the form of an accounting register.

Let's sum it up

1C Accounting registers store data that is no less important than that recorded in document forms. It is very important to be able to work correctly with various registers - this helps to understand whether the program is doing everything correctly (in accordance with your needs). All this also helps to correct errors in accounting.

I discuss the features of different registers, entering data into them, types of registrars, the difference between periodic and non-periodic registers, and much more in my course 1C: Accounting 8, presented on this site.